Error States & Remediation
What each card enrollment and verification error means, whether a retry can work, and what to do, for direct API and SDK v2 integrations.
For: developers and operations teams
Introduction
An enrollment or a card check failed and you have an error code, or only an HTTP status: this page says what it means, whether a retry can work, and what to do. The codes come back from the API, and SDK v2 passes them on unchanged as code in onError; what the person sees for each code in SDK v2 is on SDK v2: Troubleshooting. How the subaccount's tier changes which checks run is on Verification Risk Tiers.
Read an error
- Branch on
errorCodewhen present. It's the stable machine key (full list below). - Fall back to
category, then the HTTP status. Some errors carrycategorywithout anerrorCode. Failures on the network 3DS path carry neither, except an issuer rejection (verification.issuer_rejected); see Which codes you can get, and where. - Never parse or show
detail. It's for people reading logs: it includes ids, can change without notice, and may contain provider or technical context cardholders shouldn't see. - Log the verification id. SDK v2 shows
Reference: <verificationId>on its error screens and sends the same id asverificationIdinonError. Log it; Astrada support can look it up.
The error body:
| Field | Present | Use |
|---|---|---|
detail | always | for reading and debugging only; never branch on it |
errorCode | sometimes | the key to branch on |
category | sometimes | what kind of failure it is: cvc · bank-contact · hard-fraud · soft-decline · transient · infrastructure · auth-failed · auth-canceled · auth-rejected · auth-unsupported · verification-locked |
retryable | sometimes | whether the cardholder can usefully try again now |
metadata | sometimes | extra values for some codes: attemptsRemaining on stripe.amount_confirm_mismatch, lockedUntil on verification.attempts_locked |
currentValue | on a 409 | the id of the subscription or verification that already exists, at both verification create and subscription create |
With SDK v2. The error event (the object onError gets) carries code, verificationId, cardId and subscriptionId, and has no category, so branch on code. For a failure from the API, code is the API's errorCode; the SDK also sets some codes of its own. Every field: SDK v2: Events & Callbacks.
Which codes you can get, and where
Enrollment has two phases: creating the card subscription, then checking the cardholder. Each has its own codes, and the check's codes depend on the card's network and the subaccount's tier.
| Where it fails | Request | What comes back |
|---|---|---|
| Creating the subscription | POST /card-subscriptions | card_subscription.*; or detail only for 409 (already exists) and 400 (request validation, or the Mastercard pre-check refused the card) |
| Checking the card, Visa on a subaccount with a tier | POST /card-verifications/3ds and its /steps/… | stripe.* |
| Checking the card, Mastercard at any tier, or Visa with no tier (the network 3DS path) | the same | the HTTP status and detail only, except verification.issuer_rejected (403) |
The HIGHEST holds, any network | the same, including /steps/place-holds and /steps/amount-confirm | the three stripe.* hold codes; on Mastercard, a card locked out of HIGHEST at /steps/fingerprint gets 400 with detail only |
| A locked card, any network | POST /card-verifications/3ds | verification.attempts_locked or verification.attempts_locked_permanent (400) |
Error code reference
Creating the subscription: card_subscription.*
card_subscription.*These carry title and type (the code's reference page) instead of category and retryable.
errorCode | HTTP | What it means |
|---|---|---|
card_subscription.subaccount_blocking_card_type | 403 | The subaccount's enrollment controls don't allow this card type. |
card_subscription.subaccount_blocking_card_funding_type | 403 | The subaccount's enrollment controls don't allow this funding type. |
card_subscription.subaccount_blocking_card_country | 403 | The subaccount's enrollment controls don't allow cards from this country. |
card_subscription.network_blocking_card | 403 | An Astrada rule for every account refuses this card. |
card_subscription.sandbox_card_not_allowed | 403 | Sandbox environment only: enroll a sandbox test card. |
card_subscription.session_subaccount_mismatch | 403 | Enrollment link sessions only: subaccountId is not the link's subaccount. |
card_subscription.session_reference_mismatch | 403 | Personal enrollment links only: customerReferenceId is not the link's reference. |
card_subscription.consent_* | 400, 403 | The consent record was refused: Consent errors. |
What to do:
- For the
subaccount_blocking_*codes, change the subaccount's enrollment controls withPATCH /subaccounts, or use an eligible card. network_blocking_cardis a platform-level rule set by Astrada that no account or subaccount setting can override (today: Visa consumer debit and prepaid), so the only fix is to enroll an eligible card. The rules in force are reported, read-only, asnetworkBlockedCardson the subaccount.
Outcomes with detail only at create: 409 (the subscription already exists; currentValue carries the existing id) and 400 (the Mastercard pre-check refused the card, or request validation failed).
POST /enrollment-methods answers one code of this family on its own: card_subscription.card_network_not_supported (400), when the BIN's card network is not Visa, Mastercard or American Express. Use a card on a supported network.
Visa cards that must enroll through the bank
When the subaccount's enrollmentPolicy.bankEnrollment is "amex-visa", card_subscription.subaccount_blocking_card_type also refuses a Visa card that is not classified as business, whatever the subaccount's enrollment controls allow.
- That body adds
reasonCode: "card_subscription.bank_enrollment_required"andcardClass, the class the rule read (CONSUMER,PREPAID,GIFT,SPECIALTYorUNCLASSIFIED). The same code withoutreasonCodeis the subaccount's own card-type block, so branch onreasonCode, not ondetail. - A credit card refused this way can enroll through bank linking instead: create a bank link with
POST /bank-links(filters.accountTypes: ["credit"], and the card's first six digits asbin6) rather than retrying the card. SDK v2 does this itself, and offers no bank route to a debit or prepaid Visa card. POST /enrollment-methodswith thesubaccountIdgives the same answer before the card is submitted, assingleDecision.reasonbank-enrollment-required.
Consent errors
These come back only while the subaccount's consent policy is enforce (what the modes do), and a refused request enrolls no card. The body has a top-level detail, title, type and errorCode, with no errors[]; each code's page gives its detail. A direct API integration can get only the first three codes. The others arise only from Astrada's enrollment SDKs, which send the consent record themselves, so they mean a setup problem on Astrada's side; the cardholder can't fix any of them. What each SDK records: The consent record.
card_subscription.consent_required, 400, API and SDKs. Direct API: sendconsentwithchannel: "api"andtext. SDK: contact Astrada.card_subscription.consent_invalid, 400, API and SDKs. Correct the field thatdetailnames, for exampleconsent.text is invalid: Must not contain a card number.card_subscription.consent_channel_not_allowed, 403, API and SDKs. Ask Astrada to add your channel to the subaccount'sallowedChannels.- SDKs only, 400:
consent_text_unknown,consent_text_not_approved,consent_text_owner_mismatch,consent_text_kind_mismatchandconsent_hash_mismatch(allcard_subscription.). Contact Astrada with the code and the time.
If Astrada cannot check or store the consent record while the subaccount is in enforce, the create answers 500 with detail "An unexpected error happened while creating a card subscription" and no errorCode. Retry later. In log the create goes on with no record.
What SDK v2 shows for a consent refusal: SDK v2: Troubleshooting.
Checking the card: stripe.*
stripe.*These come back on Visa cards on a subaccount with a tier (Which codes you can get, and where). The HIGHEST hold codes are in HIGHEST holds.
errorCode | category | retryable | HTTP | What it means and what to do |
|---|---|---|---|---|
stripe.cvc_fail | cvc | yes³ | 400 or 500² | The security code didn't match. The cardholder enters it again; a mismatch fails at every tier. |
stripe.generic_decline | soft-decline | no | 400 or 500² | The bank declined the check. Use a different card. |
stripe.insufficient_funds | soft-decline | no | 400 or 500² | The bank declined for insufficient funds. Use a different card. |
stripe.expired_card | soft-decline | no | 400 or 500² | The card has expired. Use a card that hasn't. |
stripe.stolen_card | hard-fraud | no | 400 or 500² | The bank reports the card as stolen. Use a different card. |
stripe.lost_card | hard-fraud | no | 400 or 500² | The bank reports the card as lost. Use a different card. |
stripe.restricted_card | hard-fraud | no | 400 or 500² | The bank reports the card as restricted. Use a different card. |
stripe.card_declined_at_3ds | hard-fraud | no | 500 | The 3DS challenge succeeded, then the bank declined the card when the check finished. Use a different card. |
stripe.contact_issuer | bank-contact | no | 400 or 500² | The bank asks the cardholder to contact it. The cardholder calls the bank, then enrolls again. |
stripe.try_again_later | transient | yes | 400 or 500 | A short-lived problem reaching the bank. Try again. |
stripe.auth_failed | auth-failed | none¹ | 500 | The cardholder didn't pass the bank's 3DS check. Try again. |
stripe.auth_canceled | auth-canceled | none¹ | 500 | The 3DS check was canceled before it finished. Try again. |
stripe.auth_rejected_by_issuer | auth-rejected | none¹ | 500 | The bank refused to authenticate the card. Use another card, or the cardholder asks the bank to allow it. |
stripe.auth_unsupported | auth-unsupported | none¹ | 500 | The card can't do 3DS. Use another card. |
stripe.unknown | infrastructure | no | 400 or 500² | The bank's decline reason isn't one Astrada maps to a code. Read the verification's failureReason for the bank's own code. |
¹ auth-* failures mostly arrive without a retryable flag: treat auth-failed and auth-canceled as try again, auth-rejected and auth-unsupported as use another card. A newer auth-failed decline path does carry retryable: true; when it is present, prefer it over this default.
² Same errorCode and category either way, but the HTTP status depends on when the decline happens: 400 at verification create (refused at once); 500 if the decline happens after a 3DS challenge has already run. Branch on errorCode, not on the status code.
³ false for a request with no security code (an empty field). The same errorCode covers both "a code was sent but it's wrong" (retryable) and "no code was sent" (not retryable).
category without errorCode: a few known declines carry no code on purpose: more hard-fraud variants, too many recent charges (soft-decline, not retryable), and rate-limit and connection problems (transient, retryable). Branch on category. SDK v2 sends these with code: "server".
A card already being checked. Starting a verification for a card that has one in progress returns 409 with the existing verification's id in currentValue. Fetch it and resume at currentStepId; SDK v2 does this itself.
HIGHEST holds
The two-hold second factor's codes, on any network. All three return HTTP 400. The flow, with its screens: HIGHEST Verification.
errorCode | category | retryable | What it means | How it clears |
|---|---|---|---|---|
stripe.place_holds_declined | soft-decline | yes | One or both holds couldn't be placed. | Try again, or use another card. |
stripe.amount_confirm_mismatch | auth-failed | while metadata.attemptsRemaining > 0 | The amounts entered don't match the holds. The cardholder gets 2 tries per set of holds; the last miss voids the holds and fails the verification (attemptsRemaining: 0). | Try again while tries remain; after the last miss, start a new verification for two new holds. |
stripe.amount_confirm_locked | verification-locked | no | The card failed the two-hold check in too many verifications and is locked out of HIGHEST. | It does not expire. Only Astrada can clear it: contact Astrada. POST /card-verifications/unlock doesn't clear it. |
Hold expiry: if the cardholder doesn't confirm the amounts within 72 hours, the verification fails (the next GET returns state: failed) and the holds are voided automatically. There is no special code. Enroll the card again to start fresh.
Locked cards: verification.*
verification.*When the attempt lockout is on, repeated failures lock a card across every network. Both codes return HTTP 400 from POST /card-verifications/3ds, before any check runs. Thresholds and how failures are counted: Verification Attempt Lockout.
errorCode | category | retryable | What it means | How it clears |
|---|---|---|---|---|
verification.attempts_locked | verification-locked | no | The card is locked for a while. metadata.lockedUntil (ISO 8601) says when it clears. | On its own at lockedUntil, or by you with POST /card-verifications/unlock (scope subaccounts:write). |
verification.attempts_locked_permanent | verification-locked | no | The card is locked with no expiry. | By you, with POST /card-verifications/unlock (scope subaccounts:write). |
These are not the same as stripe.amount_confirm_locked (HIGHEST holds), the HIGHEST lock for each card, which only Astrada can clear and which POST /card-verifications/unlock doesn't touch.
Network 3DS path: Mastercard, and Visa with no tier
When 3DS runs on the card network's own path (Mastercard 3DS at every tier, and Visa with no tier set), failures carry detail only, with one exception: an issuer rejection. The network's own error codes are never returned as structured fields (at most a short provider fragment inside the 3DS details: '…' text). Otherwise your code can branch only on the HTTP status. The detail cases below are for reading logs and for support, not something your integration can tell apart or act on differently:
| HTTP | What it means | What to do |
|---|---|---|
| 400 | Refused at creation (the card is not eligible for a verification), or a step call arrived after the step had already finished or been replaced. | Nothing to retry: the card can't be verified, or the step is over. |
| 403 | With errorCode: verification.issuer_rejected (category: auth-rejected, retryable: false): the card's bank rejected the 3DS authentication on POST /card-verifications/3ds/{verificationId}/steps/fingerprint or /steps/challenge. The step and the verification are already failed. Without errorCode: the credentials don't have permission. | Issuer rejection: start a new verification; the cardholder may need a different card or to contact their bank. Permission: check your token's scopes. |
| 409 | The verification has already ended and can't be completed: the cardholder left during authentication, or the challenge window closed before it finished. Test it with Mastercard 5105 1051 0510 5100, or Visa 4000 0084 0000 0027 on a subaccount with no tier (Sandbox Testing). | Start a new verification; retrying this one returns 400. |
| 500 | The 3DS step failed, and the verification has ended. The response has a detail and no errorCode. Test it with Mastercard 5200 0078 4000 0022, or Visa 4000 0084 0000 1280 on a subaccount with no tier (Sandbox Testing). | Start a new verification. |
SDK v2 sets its own code, verification.challenge_failed, when the bank fails the cardholder's 3DS challenge on this path (below).
Codes SDK v2 sets itself
These never come from the API; SDK v2 sends them in onError with flow: "card". What the person sees for each: SDK v2: Troubleshooting.
verification.challenge_failed: the bank failed the cardholder's 3DS challenge on the network 3DS path. The person can try again with the form kept.card_subscription.already_enrolled_deactivated,card_subscription.already_enrolled_expired,card_subscription.already_enrolled_failed: the card already has a subscription in this subaccount that is not active (deactivated, expired, or left by a create that failed), and the SDK can't revive it. The person can try a different card.card_subscription.already_enrolled: the same, when the existing subscription's state couldn't be read or is one the SDK doesn't recognise. (A card that is already connected and active or pending is a success, reported withalreadyEnrolled: true.)stripe.js_load_failed: the scripts the card check needs couldn't start in the browser.stripe.unexpected_state: the check ended in a state the SDK didn't expect.stripe.resume_unavailable: a 3DS check couldn't be resumed, for example after a page refresh once its session had expired. Start a new verification.serverorclient: a failure with no code of its own.
Session, token and bank-connection codes (access_token.failed, subaccount.not_found and others): SDK v2: Troubleshooting.
Triage a failed verification with failureReason
When a card won't enroll, your backend can find out why with these read endpoints, even when the SDK does the enrolling (the SDK runs the verification in the person's browser, so your backend never sees those calls). Look a failure up by the verification id (one verification) or the card id (all of a card's failures):
GET /card-verifications/3ds?cardId={cardId}&state=failed: the card's failed verifications, each with itsfailureReason.cardIdis required. Your backend can query this view of a card at any time. You get thecardId(andsubscriptionId) from SDK v2'sonError, or from the card subscription: it's in thecardsubscription.*webhook payload, andGET /card-subscriptions/{id}returns it next to a_links.verificationslink that points straight at this query.GET /card-verifications/3ds/{verificationId}: a single verification, when you have its id. SDK v2 sends it asverificationIdinonError(and shows it on the error screen asReference: <verificationId>); direct API integrations already hold it from thePOST /card-verifications/3dsresponse.
failureReason is present only when state is failed. category, description, and retryable are always present; the other fields appear only when the bank or the provider returned them.
| Field | Always | Description |
|---|---|---|
category | yes | Stable failure category you can branch on without listing raw bank codes. |
description | yes | A plain explanation of the failure, safe to show the cardholder. |
retryable | yes | Whether the cardholder can try again now and plausibly succeed. |
issuerMessage | no | The bank's own message for the cardholder, when it sent one (declines without a challenge only). |
code | no | The raw provider reason code (a 3DS transStatusReason or a provider decline_code), for support. |
providerMessage | no | The payment provider's message for this specific code, safe to show the cardholder. More specific than description. |
adviceCode | no | The bank's advice on an authorization decline, as the provider sent it, such as try_again_later, do_not_try_again or confirm_card_data. |
acsReferences | no | The bank's 3DS reference ids, when it returned them. Useful when escalating to the bank. |
category is one of: authentication_declined, authentication_canceled, cvc_check_failed, card_declined, contact_issuer, card_blocked, too_many_attempts, not_supported, temporary_issue, processing_error. Branch on category to route, on retryable to decide whether to offer a retry, and show description (never detail) to the cardholder.
{
"id": "9fab1bea-bc1e-4757-bd47-479422e5983b",
"cardId": "8309b5f8-d5d8-49bb-9001-38bf1bb0f1e4",
"type": "3DS",
"state": "failed",
"authenticationFlow": null,
"failureReason": {
"category": "authentication_declined",
"description": "The card issuer declined the 3-D Secure authentication.",
"retryable": true,
"issuerMessage": "Your bank declined this verification. Please contact your bank or try another card.",
"code": "01",
"acsReferences": {
"acsTransactionId": "8a880dc0-d2d2-4067-bcb1-b08d1690b26e",
"acsReferenceNumber": "ACME-ACS-2024-0042",
"dsTransactionId": "97267598-fae6-494f-8453-2d3807e0c77f"
}
}
}
Two category listsThe error body's
category(cvc,soft-decline,auth-failedand the others in Read an error) comes back on the failing request.failureReason.category(cvc_check_failedand the others above) is stored on the verification for later. They are different lists; branch on the one you are reading. The raw bank code, such asincorrect_cvcfrom the sandbox test cards, is infailureReason.code. A wrong security code iscvcin the error body,cvc_check_failedinfailureReason.category, andincorrect_cvcinfailureReason.code.
Confirm the outcome on your backend
On the API. A verification that passed has state: completed (branch on state: currentStepId can still hold the last step's id). authenticationFlow reports how 3DS resolved: challenge, frictionless, or null (3DS didn't run). When it is set: How 3DS resolved.
On your backend. Don't rely on the browser:
- Webhooks (recommended):
cardsubscription.created/cardsubscription.updated(Webhooks); the subscriptionstateis the outcome:active,reqSCA(the verification has not passed; a failed verification sends no webhook and leaves itreqSCA, so read the card's verifications: Triage a failed verification),failed-to-create,deactivated,expired. Abank-feedenrollment (a card created from a completed bank link) is createdactivewith no 3DS step (reqSCAnever applies), so tell it apart byenrollmentType. - Poll:
GET /card-verifications/3ds/{verificationId}untilcompleted/failed. - SDK callback:
onSuccessfor the person's next screen; confirm on your server with 1 or 2.
With SDK v2. onSuccess returns every card connected in the session under cards, keyed by card id. Each card's authenticationFlow and enrollmentGuidance (whose availableEnrollmentMethods includes network-bulk when Astrada rates bulk enrollment likely for the card's program (for American Express, at any rating above none); the card's bank still has to support it) come on its card-enrolled event, not in onSuccess. If the person closes the SDK before finishing anything, onCancel fires instead. Full shapes: SDK v2: Events & Callbacks.
Testing error paths
Every state above can be reproduced with sandbox test cards: Test Cards & Sandbox Testing.
Bank connection states
Bank account states (active, auth_required, disconnected), what to do in each, and how to reconnect: Bank Linking Webhooks & Events.
Related
- SDK v2: Troubleshooting · Verification Risk Tiers · HIGHEST Verification · Verification Attempt Lockout · Bank Linking Webhooks & Events
Using the legacy Card Enrollment SDK? Its screens are on Legacy SDK: Troubleshooting.
Updated about 17 hours ago
