Overview
Dodo Payments returns a detailed failure reason whenever a payment attempt is unsuccessful. These reasons are standardized across payment methods and providers, so you can implement consistent handling in your application. When a payment fails, thepayment.failed webhook and the payment object expose:
error_code— a standardized failure reason from the table below.error_message— a human-readable explanation.retry_attempt—0for the original charge,1or higher for each scheduled subscription renewal retry.
Handle Payment Failures
A step-by-step developer guide for reading these codes from webhooks and the API, surfacing them to customers, and deciding when to retry.
Soft vs. Hard Declines
Every failure code falls into one of two categories. This distinction drives whether you should retry the same payment method or ask the customer for a new one.
For subscription renewals, Dodo Payments applies this distinction automatically: soft declines are re-attempted by Subscription Payment Retries, while hard declines end the retry chain immediately and are best handled with Subscription Dunning.
Transaction Failure Reasons
The following table lists every failure code, its decline type, whether the customer can resolve it, a description, and the recommended action.User Error indicates whether the payment decline can be resolved by the customer. When
Yes, the customer can take action to fix the issue (for example, entering correct card details). When No, the decline is due to system-level issues or bank restrictions that the customer cannot resolve directly.A card can also be declined when the issuing bank’s own risk engine flags the cardholder as a high-risk customer — independent of the merchant or the transaction details. These declines typically surface as generic codes such as
DO_NOT_HONOR, GENERIC_DECLINE, CARD_DECLINED, TRANSACTION_NOT_APPROVED, or FRAUDULENT. In these cases the bank does not share the specific reason, and neither Dodo Payments nor the merchant can override the decision. Ask the customer to contact their bank to resolve the flag, or use a different card or payment method.Handling Failures Programmatically
Readerror_code from the payment.failed webhook or the payment object, map it to the recommended action above, and decide whether to retry. For subscription renewals, soft declines are retried for you automatically — see Subscription Payment Retries.
For API-level and business-logic errors (such as PAYMENT_NOT_SUCCEEDED or REFUND_WINDOW_EXPIRED) that are not card declines, see the Error Codes reference.
Related
Handle Payment Failures
End-to-end guide to detecting, surfacing, and retrying failed payments.
Error Codes
API and business-logic error codes for non-decline failures.
Subscription Payment Retries
Automatic retries that recover soft declines on subscription renewals.
Subscription Dunning
Email sequences that recover hard declines by prompting a payment method update.