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.

CODE
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.

CodeDeclineMessage
2000Do Not HonorYour card was declined. Try again or use a different card.
2001Insufficient FundsYour card doesn't have enough funds. Use a different card.
2002Limit ExceededThis payment is over your card's limit. Use a different card.
2003Issuer DeclinedYour card was declined. Try again or use a different card.
2004Authorization RequiredYour bank needs you to approve this payment. Try again.
2005Processing ErrorWe couldn't process your card. Try again.
20063DS Not EnrolledYour card couldn't be verified. Try again or use a different card.
3000Additional Authorization RequiredYour bank needs you to approve this payment. Try again.
3001Address Verification FailedThe billing address doesn't match your card. Check it and try again.
3002Invalid CardCheck your card number and try again.
3003CVC InvalidCheck your card's security code and try again.
3004Expiry Date InvalidCheck your card's expiry date and try again.
3005Card Number InvalidCheck your card number and try again.
3006Expired CardYour card has expired. Use a different card.
3007Invalid TransactionYour card was declined. Use a different card.
3008Lost or Stolen CardYour card was declined. Use a different card.
3009Fraudulent TransactionYour card was declined. Use a different card.
3010Hard DeclineYour card was declined. Use a different card.
3011Merchant ErrorPayments aren't available right now. Try again later.
3012Duplicate Transaction / Velocity FilterYour card was declined. Use a different card.
3013Issuer ErrorYour card was declined. Use a different card.
3014Refund ErrorPayments aren't available right now. Try again later.
3015Pick Up CardYour card was declined. Use a different card.
30163DS Authentication FailedYour card couldn't be verified. Try again or use a different card.
3017Blocked by Block ListYour card was declined. Use a different card.
4000Bank Account DeclinedYour bank account can't be used for this payment. Choose another payment method.
4001Bank Account Requires Additional VerificationYour bank account can't be used for this payment. Choose another payment method.
4002Bank Account Routing Number InvalidYour bank account can't be used for this payment. Choose another payment method.
4003Bank Account Does Not Support SEPA / ACHYour bank account can't be used for this payment. Choose another payment method.
5000Payment Method UnsupportedThis payment method didn't work. Try again or choose another.
5001Payment Method FailedThis payment method didn't work. Try again or choose another.
5003Payment Method Failed - TimeoutThis payment method didn't work. Try again or choose another.
5004Payment Method Invalid ParameterThis payment method didn't work. Try again or choose another.
5005Error Invalid Country CodeThis payment method didn't work. Try again or choose another.
5006Error Invalid Cardholder Name or DataCheck the name on the card and try again.
5007Gateway is not activePayments aren't available right now. Try again later.
5008No available gatewaysPayments 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.