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.

Match codes, not message text. While a payment is still pending, the reason for a retryable attempt may not appear on the payment.

Decline codes

CodeCategoryMeaning
card_declined issuer_declined declined do_not_honor generic_declineCard or issuer declineThe card was declined; another method may be needed.
insufficient_fundsInsufficient fundsThe card has insufficient funds.
expired_cardExpired cardThe card has expired.
incorrect_cvc invalid_cvcInvalid security codeThe security code is wrong.
incorrect_numberInvalid card numberThe card number is wrong.
transaction_not_allowedTransaction restrictedThe card does not support this transaction.
fraudulentRisk rejectionRisk checks declined the payment. This does not prove fraud.
lost_card stolen_card pickup_cardIssuer restrictionDeclined; the customer should contact their bank.
invalid_accountInvalid accountUse another card or contact the bank.
payment_intent_authentication_failureAuthentication failure3D Secure failed; try again or use another method.
try_again_laterTemporary rejectionWait or use another method. Wegopay does not retry automatically.
card_velocity_exceededCard limitWait or contact the bank.
test_mode_live_cardTest card requiredA real card was used in sandbox.
expiredSession expiredThe checkout session expired. Different from expired_card.
processing_errorProcessing failureThe payment network could not process the payment.

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.

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.