The following cards can be used with the test API to simulate various success and error scenarios.
400 card_declined
{
"error": "card_declined",
"error_description": "The card was declined",
"charge_token": "ch_lfUYEBK14zotCTykezJkfg"
}
400 insufficient_funds
{
"error": "insufficient_funds",
"error_description": "There are not enough funds available to process the requested amount",
"charge_token": "ch_lfUYEBK14zotCTykezJkfg"
}
400 invalid_cvv
{
"error": "invalid_cvv",
"error_description": "The card verification code (cvc) was not in the correct format",
"charge_token": "ch_lfUYEBK14zotCTykezJkfg"
}
400 invalid_card
{
"error": "invalid_card",
"error_description": "The card was invalid",
"charge_token": "ch_lfUYEBK14zotCTykezJkfg"
}
400 processing_error
{
"error": "processing_error",
"error_description": "An error occurred while processing the card",
"charge_token": "ch_lfUYEBK14zotCTykezJkfg"
}
400 suspected_fraud
{
"error": "suspected_fraud",
"error_description": "The transaction was flagged as possibly fraudulent and subsequently declined",
"charge_token": "ch_lfUYEBK14zotCTykezJkfg"
}
502 gateway_error
{
"error": "gateway_error",
"error_description": "An upstream error occurred while processing the transaction. Please try again.",
"charge_token": "ch_lfUYEBK14zotCTykezJkfg"
}
400 unknown
{
"error": "unknown",
"error_description": "Sorry, an unknown error has occurred. This is being investigated"
}
To simulate an invalid expiry date, provide the API with an expiry date in the past.
The following cards can be used with the test API to elicit a simulated 3D Secure process.
202 accepted
{
"token": "ch_lfUYEBK14zotCTykezJkfg",
"status_message": "Pending",
"redirect_url": "https://sandbox.checkout.com/api2/v2/3ds/acs/sid_feixbit6us3utfedjulm6egnsu"
}
202 accepted
{
"token": "ch_lfUYEBK14zotCTykezJkfg",
"status_message": "Pending",
"redirect_url": "https://sandbox.checkout.com/api2/v2/3ds/acs/sid_feixbit6us3utfedjulm6egnsu"
}
202 accepted
{
"token": "ch_lfUYEBK14zotCTykezJkfg",
"status_message": "Pending",
"redirect_url": "https://sandbox.checkout.com/api2/v2/3ds/acs/sid_feixbit6us3utfedjulm6egnsu"
}
After following the redirect URL and completing the challenge, verifying the charge will result in a declined card error.
200
{
"success": false,
"token": "ch_lfUYEBK14zotCTykezJkfg",
"status_message": "Card Declined",
"error_message": "Card Declined"
}
Note the above is just a snippet of the returned response. View the full schema ›
202 accepted
{
"token": "ch_lfUYEBK14zotCTykezJkfg",
"status_message": "Pending",
"redirect_url": "https://sandbox.checkout.com/api2/v2/3ds/acs/sid_feixbit6us3utfedjulm6egnsu"
}
After following the redirect URL, verifying the charge will result in a declined card error.
200
{
"success": false,
"token": "ch_lfUYEBK14zotCTykezJkfg",
"status_message": "Card Declined",
"error_message": "Card Declined"
}
Note the above is just a snippet of the returned response. View the full schema ›