Declines, blocks & card testing
How payments fail, and the anti-fraud controls that block abuse.
A payment can fail two ways: the issuer declines it, or our anti-fraud controls block it before it reaches the card networks.
Declines
A declined confirm returns HTTP 200 with last_payment_error populated and status moved to requires_payment_method on the PaymentIntent:
1{ "type": "card_error", "code": "insufficient_funds", "retryable": true, "advice_code": "try_again_later" }
The code names the reason: insufficient_funds, cvc_check_failed and expired_card come back where card_declined used to. Show the customer a generic "card was declined" message: never the raw code.
retryable: false marks a decline that a retry cannot fix, such as expired_card: ask for another card. With retryable: true the PaymentIntent is back in requires_payment_method and accepts another attempt; a Checkout Session stays open. That does not mean the same card will succeed.
advice_code appears when the card's bank or the card network says what to do next, and is absent otherwise:
advice_code | What to do |
|---|---|
try_again_later | Try the card again later. |
do_not_try_again | Stop using this card. Ask the customer for another. |
confirm_card_data | The card details are wrong or out of date. Ask the customer to check them or update the card. |
A saved-card charge from your server (off_session: true, confirm: true) answers differently: a refused card is HTTP 402, with the PaymentIntent at error.meta.payment_intent and last_payment_error on it. When the bank wants the customer to authenticate, the code is authentication_required, and the customer has to pay again while present. See Charging saved cards.
If the card's bank does not answer in time, or the answer does not say what happened to the card, the PaymentIntent reads processing, not declined. Do not start a second payment for that order.
3D Secure declines
A payment that fails 3D Secure (3DS) never reaches the card networks. last_payment_error has type: "authentication_error" and a 3DS code (most start with 3ds_), and retryable is always true:
1{ "type": "authentication_error", "code": "3ds_auth_failed", "retryable": true }
| Code | What happened | What the payer should do |
|---|---|---|
3ds_auth_failed | The bank did not authenticate the payer. This includes a payer who cancels the bank challenge. | Try once more with the same card, then use another card. |
3ds_auth_rejected | The bank refused authentication without showing a challenge. | Use another card. |
3ds_auth_unavailable | The bank could not authenticate the card: its 3DS service was unavailable or returned no verdict. | Use another card. In live this can be a temporary bank outage, so the same card may work later. |
3ds_auth_bypassed | The bank skipped authentication, so there is no proof the cardholder took part. | Use another card. |
3ds_not_enrolled | The card is not enrolled in 3DS. | Use another card. |
3ds_unsafe_auth_result | The bank returned a result the 3DS policy does not accept, such as an attempt with no real authentication. | Use another card. |
3ds_unsafe_eci | The authentication indicator (ECI) says the payer was not authenticated. | Use another card. |
3ds_unsafe_ucaf | The Mastercard indicator (UCAF) says no authentication data was collected. | Use another card. |
3ds_missing_evidence | Authentication finished without the proof the policy requires. | Use another card. |
3ds_eci_unrecognized | The bank returned an authentication indicator we could not read. | Use another card. |
3ds_challenge_unavailable | The bank asked for a challenge but gave no way to start it. | Use another card. |
3ds_enrollment_invalid | The card is enrolled, but the bank's answer was incomplete. | Use another card. |
3ds_enrollment_unknown | The bank's enrollment answer was not one we recognize. | Use another card. |
3ds_enrollment_rejected | The account's 3DS policy rejects this card's enrollment status. | Use another card. |
missing_auth_info, validation_failed, malformed_response | The bank's answer to the challenge was missing or unreadable. | Use another card. Contact support with the PaymentIntent id if these repeat. |
THREE_DS_SETUP_FAILED, THREE_DS_ENROLLMENT_FAILED, THREE_DS_VALIDATION_FAILED | A step of the 3DS round trip did not finish, for example a timeout. The card was not refused. | Try again with the same card. If it keeps failing, use another card. |
THREE_DS_EVIDENCE_REQUIRED, THREE_DS_EVIDENCE_NOT_ACCEPTED | Your integration sent the wrong 3DS evidence for how this account runs 3DS. | Fix the integration. Retrying will fail the same way. |
3DS_FAILED, 3DS_NO_AUTH_DATA, 3DS_UNEXPECTED_STATE, 3DS_UNEXPECTED_DECISION | 3DS ended in a state we did not expect. | Try again. Contact support with the PaymentIntent id if it repeats. |
A payer who cancels the 3DS challenge currently gets 3ds_auth_failed, the same code as a failed authentication. You can't tell the two apart.
The 3DS policy is per account
CX Pay sets the 3DS policy for each account, separately for test and live. The default is strict in both: a payment proceeds only when the bank fully authenticates the payer. Some sandbox test cards that a card network lists as "approved" (attempts processing, bypassed, authentication unavailable) decline here with the codes above. That is the correct result under the strict policy. Contact support if your account needs a different policy.
Blocks (anti-card-testing)
To stop card-testing (rapid-fire attempts to validate stolen cards), we block before the payment reaches the card networks:
- Amount floor — payments below a minimum return
400 AMOUNT_BELOW_MINIMUM. Setup-mode (saving a card without charging) is exempt. - Attempt cap — repeated declined confirms on one PaymentIntent lock it (
422 CARD_BLOCKED);blocked_reasonisattempt_cap. - Velocity — too many declines for one card or BIN, per merchant, in a short window also blocks (
blocked_reasonvelocity/bin_enumeration/min_amount).
The PaymentIntent surfaces attempt_count, locked_at, and blocked_reason so you can see why.
CARD_BLOCKED deliberately returns a generic "this payment cannot be processed" message and never reveals which control fired — that information would help an attacker tune around it.
What to do
Don't auto-retry a blocked payment — back off and let the customer try later or contact you. Auto-retrying a decline loop is exactly the pattern these controls exist to stop.