Skip to content
Status

Shift4 test cards

Use these details to try payments in a Shift4 sandbox (test) account. They work only in the sandbox: never use them in live, and never put real card or bank details into a sandbox.

Shift4’s test environment accepts only the card numbers Shift4 lists: any other number gives an error. Most results are set by the payment amount, the billing address or the CVC, not by the card number.

  • Only the card numbers on Shift4’s Test Card Numbers page work; any other number gives an error. The checkout rejects a number that fails the check-digit (Luhn) test before it reaches Shift4, so the Luhn test card below can’t be tried through the checkout.
  • The payment amount sets most results, including approvals, referrals, declines and slow responses (Test Server Triggers). We send the amount as entered, in dollars and cents, so type the trigger amount as the payment amount without the thousands commas: for example 999998.50 for a referral, or 19.19 as the refund amount for a declined refund.
  • The address check reads a two-digit sequence in the first line of the billing address or the postcode (Test Server Triggers). Switch on Require address (AVS) in the Shift4 connection settings here (with the Auth Token, Account Currency and Timezone) so the checkout asks for the billing address, then type the sequence into the address line or postcode. We send only the first 30 characters of the address line, and send the postcode only when it is 5 to 9 characters long, so put the sequence within those characters.
  • The CVC you type in the checkout sets the CVC check result (Test Server Triggers). We send it unchanged, and no connection setting is needed.

Use any future expiry date. Shift4 lists more numbers for each brand on its Test Card Numbers page; it doesn’t list a Maestro test card.

Any payment of 999,997.99 or less is approved.

Card Number Notes
Visa 4321 0000 0000 1119 Used in our own tests
Mastercard 5432 0000 0000 3332
Mastercard 2221 0000 0000 0009 2-series number
American Express 3734 000000 02221
Discover 6011 0000 0000 4444
Diners Club 3059 9100 0000 7215
JCB 3337 0000 0000 5551

To try a slow response, use 111. followed by the delay in seconds as the cents: an amount of 111.33 is approved after 33 seconds. Used in our own tests. Shift4’s Test Server Triggers page lists delayed declines and errors too.

Use any test card above with these amounts, or the card numbers shown.

Number or trigger Result
Amount from 999,999.00 up to (but not including) 2,000,000,000.00 Declined
Amount from 999,998.00 to 999,998.99 Referral: call the card issuer
Refund of 19.19 Refund declined
Amount 32,202.00 Error (Shift4’s test host error)
4444 0000 0000 8686 Error: please retry the transaction
4321 0000 0000 1118 Rejected: card number fails the check-digit (Luhn) test

For the address check, put one of these two-digit sequences anywhere in the first line of the billing address or in the postcode. Shift4 reads the values from left to right, and the first line of the address takes priority over the postcode. A value that contains none of them gives N.

Value Result
Address or postcode contains 89 AVS Y: street and five-digit ZIP match
Address or postcode contains 88 AVS X: street and nine-digit ZIP match
Address or postcode contains 65 AVS A: street matches, postcode doesn’t
Address or postcode contains 90 AVS Z: only the postcode matches
Address or postcode contains 78 AVS N: no match
Address or postcode contains 82 AVS R: card issuer system unavailable
CVC 333 or 3333 CVC M: match
CVC 444 or 4444 CVC N: no match
CVC 555 or 5555 CVC P: not processed
CVC 777 or 7777 CVC U: issuer unable to process

Was this page helpful?