When you are testing your integration with Shift4, viewing request logs in your dashboard might be useful.

Test card numbers

When making requests in test mode, you must use one of the following cards to simulate a successful charge:

Card number Card type
4012000100000007 Visa
4242424242424242 Visa
4012888888881881 Visa
4000056655665556 Visa (debit)
5555555555554444 MasterCard
5200828282828210 MasterCard (debit)
5105105105105100 MasterCard
2222000000000008 MasterCard
6759649826438453 Maestro
378282246310005 American Express
371449635398431 American Express
6011111111111117 Discover
6011000990139424 Discover
30569309025904 Diners Club
38520000023237 Diners Club
3530111333300000 JCB
3566002020360505 JCB

Testing validation errors

You can use one of the following card numbers to test validation errors in test mode.

Errors can be simulated by creating a token, charge, or subscription.

Card number Error code and description
4024007102349866 invalid_number - The card number is not a valid one.
4532873294814636 invalid_expiry_month - The card's expiration month is invalid.
4532582477951947 invalid_expiry_year - The card's expiration year is invalid.
4024007189368227 invalid_cvc - Your card's security code is invalid.
4916487051294548 expired_card - The card has expired.

Testing card processing errors

In test mode, you can use one of the following card numbers to test various error responses.

Errors can be simulated only by creating a charge or subscription. Note that creating a token won’t return an error.

Card number Error code and description
4024007134364842 incorrect_cvc - The card's security code failed verification.
4929225021529113 incorrect_zip - The card's zip code failed validation.
4242000000000323 incorrect_address - The card's address failed validation.
4024007118468684 insufficient_funds - The charge amount exceeds the available fund or the card's credit limit.
4024007114621187 lost_or_stolen - The card is marked as lost or stolen.
4024007155502486 suspected_fraud - The charge is suspected to be fraudulent.
4916018475814056 card_declined - The card was declined for another reason.
4916449457024978 authentication_required - The charge requires cardholder authentication.
4024007114166316 processing_error - An error occurred while processing the card.
4242000000000083 This card will only work when CVC is 123. Otherwise, it will return an incorrect_cvc error code.

Testing disputes

In test mode, you can test charge disputes by creating charges with one of the following cards:

Card number Dispute type
4242000000000018 Chargeback
4242000000000026 Retrieval request (soft chargeback)

Note that the charge created with one of those cards won't be disputed immediately after its creation. Usually, you need to wait about 1 minute for the charge to change its status to disputed.

When testing disputes, it is also possible to simulate different dispute flows. To do this, you must enter winning_evidence or losing_evidence text into the uncategorized_text field.

Testing fraud check

In test mode, you can test fraud check by creating charges with one of the following cards:

Card number Fraud check result
4242000000000042 Safe
4242000000000059 Suspicious
4242000000000067 Fraudulent
4242000000000208 Fraudulent (with fraud warning)
4242000000000075 Unknown

Testing 3D Secure

In test mode, you can test 3D Secure by using one of the following cards:

Card number 3D Secure check result
4012001800000016 Enrolled for 3D Secure 2
all other test cards Not enrolled for 3D Secure

Testing credit

In test mode, you can test credit by using one of the following cards:

Card number Credit result
4242000000011114 Successful (with fast credit support)
all other test cards Successful