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
failureCodeandfailureMessage. - Pay and confirm attempts:
failureCodeandmessage, withattemptsLeft. - 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.
| Code | Category | Meaning |
|---|---|---|
card_declined issuer_declined declined do_not_honor generic_decline no_action_taken | Card or issuer decline | The card was declined; another method may be needed. |
insufficient_funds balance_insufficient | Insufficient funds | The card has insufficient funds. Retry later or use another card. |
card_velocity_exceeded withdrawal_count_limit_exceeded | Card limit | The 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_supported | Transaction restricted | The card does not support this transaction; use another method. |
invalid_account | Invalid account | Use another card or contact the bank. |
call_issuer | Contact the bank | The customer must contact their bank. |
expired_card | Expired card | The card has expired. |
invalid_expiry_month invalid_expiry_year | Invalid expiry date | Correct the expiry date and try again. |
incorrect_cvc invalid_cvc cvc_check_failed | Invalid security code | The security code is wrong. |
incorrect_number invalid_number | Invalid card number | The card number is wrong. |
incorrect_zip | Invalid postal code | The billing postal code does not match the card. |
payment_intent_authentication_failure authentication_required | Authentication failure | 3D Secure failed or is required; try again and complete verification. |
fraudulent | Risk rejection | Risk 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_authorization | Issuer or security restriction | Declined; do not retry the card. The customer should contact their bank. |
try_again_later approve_with_id processing_error | Temporary rejection | Wait or use another method. Wegopay does not retry automatically. |
amount_too_large amount_too_small invalid_amount | Amount not accepted | The amount is outside what the card or network accepts. |
test_mode_live_card | Test card required | A real card was used in sandbox. |
payment_intent_canceled payment_failed | Payment ended | The payment did not complete; create a new payment. |
expired | Session expired | The checkout session expired. Different from expired_card. |
Fallback codes
| Code | Meaning |
|---|---|
provider_declined | A generic decline when no specific code is available. |
card_token_rejected | The card token was rejected. Fix capture before another attempt. |
processor_unavailable | A generic checkout failure. Read the payment and checkout state before retrying. |
submission_unavailable | The 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 see | Show the customer |
|---|---|
Attempt insufficient_funds, checkout failed_retryable, payment pending | Payment pending. Last attempt: insufficient funds. |
Checkout expired with checkout_expired, payment pending | Checkout expired; payment unresolved. |
Payment failed | Payment failed. |
See payment status for statuses and checkout states.