Skip to main content

Testing

To confirm that your integration works correctly, simulate transactions without moving any money using special values in Test environment.

Retrieve your Test API Keys from your Account.

Test payment methods let you simulate several scenarios:

  • Succeeded payments by card brand
  • Card errors due to declines, fraud, or invalid data
  • Refunds
  • Payouts

When you're ready to take your integration live, replace your Test publishable and secret API keys with Production ones. You can't process live payments if your integration is still using your test API keys.

Test environment​

Each account has a Test and a Production environment. See Accounts. Test mode uses the same API host as production, and your Test API keys select the test environment. Card collection and card details sent with a payment have their own test hostnames:

UseHostKey
API requestshttps://api.publicsquare.comTest Secret Key
Save a cardhttps://collect-test.publicsquare.comTest Publishable Key
Send card details with a payment or payouthttps://secure.payments.sbx.credova.comTest Secret Key

Elements SDK version 1.16.1 and later work with test keys against a production account. See the SDK versions.

Cards​

The following card numbers can be used for testing your integration while in Test environment.

Cards by brand​

BrandNumberCVCExpiration Date
Visa4242424242424242Any 3 digitsAny future date
Mastercard5555555555554444Any 3 digitsAny future date
American Express378282246310005Any 4 digitsAny future date
Discover6011111111111117Any 3 digitsAny future date
Diners Club3056930009020004Any 3 digitsAny future date
UnionPay6200000000000005Any 3 digitsAny future date

Declined payments​

Decline ReasonNumberPayment Status
Decline4000000000000002declined
Insufficient Funds4000000000009995declined
Lost/Stolen4000000000009987declined

Declined payouts​

Decline ReasonNumberPayment Status
Decline4000000000000002declined
Lost/Stolen4000000000009987declined

Declined payments during capture​

Decline ReasonNumberPayment Status
Settlement amount is not equal to authorized amount4000000000000119declined

Fraudulent payments​

DescriptionNumberPayment StatusFraud DecisionAVS CodeCVV2 Reply
Rejected fraud decision4100000000000019rejectedrejectYM
Review fraud decision4000000000009235succeededreviewYM
CVC check fails4000000000000101rejectedrejectYN
Postal code check fails4000000000000036succeededreviewAM
Address Line1 check fails4000000000000028succeededreviewZM
Address check fails4000000000000010rejectedrejectNM

3D Secure​

3DS authentication is triggered by the card number. Use any future expiration date, any CVV and any billing ZIP. See 3D Secure for how authentication works.

ScenarioCard numberBrandExpected result
Frictionless success5204247750001471Mastercardsucceeded, no challenge
Frictionless success340000000004001Amexsucceeded, no challenge
Challenge success4000020000000000Visachallenge → succeeded
Challenge success370000000000002Amexchallenge → succeeded
Mandated challenge4761369980320253Visachallenge → succeeded
Mandated challenge5200000000001104Mastercardchallenge → succeeded
Out-of-band challenge4000000000000341Visachallenge → succeeded
Authentication attempted4111111111111111Visasucceeded (partial shift)
Authentication attempted5424180011113336Mastercardsucceeded (partial shift)
Authentication failed4264281511112228Visafailed
Authentication failed5424180000000171Mastercardfailed
Authentication unavailable5405001111111165Mastercardfailed
Authentication rejected5405001111111116Mastercardfailed
Failed challenge4055011111111111Visachallenge → failed
Failed challenge5427660064241339Mastercardchallenge → failed
Directory server error4264281500003339Visafailed (error surfaced)
Internal server error4264281500001119Visafailed (error surfaced)

Bank accounts​

The following bank accounts can be used for testing your integration while in Test environment. The payment/payment status will initially be pending. For payments, after a short period of time, the payment status will be updated and a payment:update Webhook will be sent with the payment in the entity of the payload. For payouts, the payout status will be updated and a payout:update Webhook will be sent with the payout in the entity of the payload.

RoutingNumberPayment StatusDecline Reason
110000000000123456789succeededN/A
110000000000111111113declinedAccount Closed
110000000000111111116declinedInvalid Account Number
110000000000222222227declinedInsufficient Funds
110000000000555555559declinedDecline. Customer cancellation
110000000000333333335declinedStop Payment Order
110000000000444444440declinedAccount Locked

Transaction amounts​

You can use specific payment amounts to trigger different responses during processing. The test payment methods will be evaluated first before checking the payment amount:

Amount($)Authorize/SaleCaptureFraud Decision
2000rejectedN/Aaccept
3000succeededN/Areview
4000errorN/Aaccept
5000declinedN/Aaccept
6000requires_capturedeclinedaccept

Dispute cases​

You can use specific card payment amounts to trigger the generation of dispute cases to simulate chargebacks and inquiries from the credit card networks. The test amount will be evaluated only for card payments, and generate a dispute with the defined status. Adjustments to simulate the flow of back-and-forth of funds during a chargeback process will also be created:

Amount($)StatusEvidence Submitted# of Adjustments
7000needs_responsefalse1
7100under_reviewtrue2
7200wontrue2
7300losttrue3
7400warning_needs_responsefalse0
7500warning_under_reviewtrue0
7600warning_closetrue0