Payment errors
When a card or other payment is declined, the Campaigns API answers the order with a payment_response_code. Each of the 37 codes has a sentence for the shopper in every language, at payment.errors.<code> in GET /v1/locales/:lang.
Showing a decline
Show payment.errors.<code> for the code the order was answered with, and payment.errors.generic for a code with no sentence of its own, such as one added after this page. Do not show payment_details: it is the gateway's own wording, in English, and names the reason for a code whose sentence does not.
const texts = await fetch(base + '/v1/locales/en').then((res) => res.json());
// The order was answered { "payment_response_code": "3005", "payment_details": "Invalid Card Number" }
const errors = texts.payment.errors;
const message = errors[order.payment_response_code] ?? errors.generic;
// 'Check your card number and try again.'A code added to the API is shown the generic sentence until it is added here, and adding it changes only the locale files: a client reads the sentence from the service, not from a copy of its own.
Codes
The decline is the API's name for the code. The message is the English one; every language is on its page under Languages.
| Code | Decline | Message |
|---|---|---|
2000 | Do Not Honor | Your card was declined. Try again or use a different card. |
2001 | Insufficient Funds | Your card doesn't have enough funds. Use a different card. |
2002 | Limit Exceeded | This payment is over your card's limit. Use a different card. |
2003 | Issuer Declined | Your card was declined. Try again or use a different card. |
2004 | Authorization Required | Your bank needs you to approve this payment. Try again. |
2005 | Processing Error | We couldn't process your card. Try again. |
2006 | 3DS Not Enrolled | Your card couldn't be verified. Try again or use a different card. |
3000 | Additional Authorization Required | Your bank needs you to approve this payment. Try again. |
3001 | Address Verification Failed | The billing address doesn't match your card. Check it and try again. |
3002 | Invalid Card | Check your card number and try again. |
3003 | CVC Invalid | Check your card's security code and try again. |
3004 | Expiry Date Invalid | Check your card's expiry date and try again. |
3005 | Card Number Invalid | Check your card number and try again. |
3006 | Expired Card | Your card has expired. Use a different card. |
3007 | Invalid Transaction | Your card was declined. Use a different card. |
3008 | Lost or Stolen Card | Your card was declined. Use a different card. |
3009 | Fraudulent Transaction | Your card was declined. Use a different card. |
3010 | Hard Decline | Your card was declined. Use a different card. |
3011 | Merchant Error | Payments aren't available right now. Try again later. |
3012 | Duplicate Transaction / Velocity Filter | Your card was declined. Use a different card. |
3013 | Issuer Error | Your card was declined. Use a different card. |
3014 | Refund Error | Payments aren't available right now. Try again later. |
3015 | Pick Up Card | Your card was declined. Use a different card. |
3016 | 3DS Authentication Failed | Your card couldn't be verified. Try again or use a different card. |
3017 | Blocked by Block List | Your card was declined. Use a different card. |
4000 | Bank Account Declined | Your bank account can't be used for this payment. Choose another payment method. |
4001 | Bank Account Requires Additional Verification | Your bank account can't be used for this payment. Choose another payment method. |
4002 | Bank Account Routing Number Invalid | Your bank account can't be used for this payment. Choose another payment method. |
4003 | Bank Account Does Not Support SEPA / ACH | Your bank account can't be used for this payment. Choose another payment method. |
5000 | Payment Method Unsupported | This payment method didn't work. Try again or choose another. |
5001 | Payment Method Failed | This payment method didn't work. Try again or choose another. |
5003 | Payment Method Failed - Timeout | This payment method didn't work. Try again or choose another. |
5004 | Payment Method Invalid Parameter | This payment method didn't work. Try again or choose another. |
5005 | Error Invalid Country Code | This payment method didn't work. Try again or choose another. |
5006 | Error Invalid Cardholder Name or Data | Check the name on the card and try again. |
5007 | Gateway is not active | Payments aren't available right now. Try again later. |
5008 | No available gateways | Payments aren't available right now. Try again later. |
Codes that give no reason
3007, 3008, 3009, 3012, 3013, 3015, 3017 are shown the plain decline, the same sentence as 3010 Hard Decline. The reason an issuer gives for these is not passed on to the shopper, as card networks and gateways advise; the shopper is asked to use a different card.