Skip to content

Concepts

Failure codes

A failure code explains why an attempt or payment failed. It is the reason, not the status: always take the outcome from the payment status.

Where codes appear

  • Payment reads and webhooks: nullable failureCode and failureMessage.
  • Pay and confirm attempts: failureCode and message, with attemptsLeft.
  • Dashboard transactions and their CSV export: the payment's failure code, plus the latest declined attempt and the number of attempts. The transaction details explain each code in plain language and list every attempt with its own code.

Match codes, not message text. While a payment is still pending, the reason for a retryable attempt does not appear on the payment; the dashboard shows it as the latest declined attempt.

Decline codes

When an issuer gives a specific reason, it is used as the failure code, even when a more generic code was also reported. Codes not listed here are kept as reported.

CodeCategoryMeaning
card_declined issuer_declined declined do_not_honor generic_decline no_action_takenCard or issuer declineThe card was declined; another method may be needed.
insufficient_funds balance_insufficientInsufficient fundsThe card has insufficient funds. Retry later or use another card.
card_velocity_exceeded withdrawal_count_limit_exceededCard limitThe card reached a spending or transaction limit. Wait or contact the bank.
transaction_not_allowed service_not_allowed not_permitted card_not_supported restricted_card currency_not_supportedTransaction restrictedThe card does not support this transaction; use another method.
invalid_accountInvalid accountUse another card or contact the bank.
call_issuerContact the bankThe customer must contact their bank.
expired_cardExpired cardThe card has expired.
invalid_expiry_month invalid_expiry_yearInvalid expiry dateCorrect the expiry date and try again.
incorrect_cvc invalid_cvc cvc_check_failedInvalid security codeThe security code is wrong.
incorrect_number invalid_numberInvalid card numberThe card number is wrong.
incorrect_zipInvalid postal codeThe billing postal code does not match the card.
payment_intent_authentication_failure authentication_requiredAuthentication failure3D Secure failed or is required; try again and complete verification.
fraudulentRisk rejectionRisk checks declined the payment. This does not prove fraud. Do not retry the card.
lost_card stolen_card pickup_card merchant_blacklist security_violation revocation_of_authorizationIssuer or security restrictionDeclined; do not retry the card. The customer should contact their bank.
try_again_later approve_with_id processing_errorTemporary rejectionWait or use another method. Wegopay does not retry automatically.
amount_too_large amount_too_small invalid_amountAmount not acceptedThe amount is outside what the card or network accepts.
test_mode_live_cardTest card requiredA real card was used in sandbox.
payment_intent_canceled payment_failedPayment endedThe payment did not complete; create a new payment.
expiredSession expiredThe checkout session expired. Different from expired_card.

Fallback codes

CodeMeaning
provider_declinedA generic decline when no specific code is available.
card_token_rejectedThe card token was rejected. Fix capture before another attempt.
processor_unavailableA generic checkout failure. Read the payment and checkout state before retrying.
submission_unavailableThe payment was not submitted for processing, so no charge was attempted. The customer can try again.
operator_closed_*Wegopay support closed an unresolved payment, for example after confirming no charge was made.

Always handle unknown codes

failureCode is an open string, not a closed list. Other codes such as error, failed or canceled can appear. Show a generic message, keep the code for support, and take the outcome from the payment status. No code, including processing_error, by itself means you should charge again.

Mapping examples

What you seeShow the customer
Attempt insufficient_funds, checkout failed_retryable, payment pendingPayment pending. Last attempt: insufficient funds.
Checkout expired with checkout_expired, payment pendingCheckout expired; payment unresolved.
Payment failedPayment failed.

See payment status for statuses and checkout states.