last_payment_error object contains detailed information about the most recent payment failure. It helps developers understand why a payment did not succeed and provides data to display user-friendly messages or handle errors programmatically.last_payment_error.code is a short identifier for the type of error.last_payment_error.decline_code is returned when the card issuer declines the payment and indicates the specific reason, if available. Not all card declines include a decline_code.last_payment_error.message provides a human-readable description of the error.| Code | Description |
|---|---|
| system_error | System encountered an error |
| payment_intent_authentication_failed | 3DS authentication failed:%s. |
| card_declined | The card issuer declined the transaction. |
| payment_method_not_available | Function/service not enabled. |
| reenter_transaction | Please re-enter the transaction. If the issue persists, please contact the issuer bank. |
| processing_error | There was an error processing your card. Please try again later or use a different payment method. |
| fraudulent | Blocked by the payment company's risk control system. |
| quota_exceeded | Quota exceeded. |
| provider_session_expired | Provider session expired. |
| invalid_account | This account cannot be used. Please use a different account. |
| Decline Code | Description |
|---|---|
| insufficient_funds | Insufficient account balance. |
| lost_card | The card has been reported lost. |
| stolen_card | Stolen or lost card. |
| expired_card | The card has expired. |
| incorrect_cvc | Invalid card verification value. |
| restricted_card | this card cannot be used for this payment. It may have restrictions set by your bank. Please try another payment method or contact your card issuer. |
| transaction_not_allowed | 1. The card does not allow this type of transaction. 2. The merchant is not allowed to accept this card for this transaction. |
| card_velocity_exceeded | 1.The customer exceeded the card's transaction limits. 2.The customer has exceeded the amount limit available on their card. |
| pin_try_exceeded | Too many incorrect PIN attempts. |
| call_issuer | Refer to card issuer. |
| do_not_honor | Do not honor. |
| fraudulent | Suspected fraud or intercepted by card issuer risk control. |
| processing_error | There was an error processing your card. Please try again later or use a different payment method. |
| invalid_account | This card cannot be used. Please use a different card. |
| incorrect_number | The card number is incorrect. |
code provides a general classification of the payment failure for programmatic handling.decline_code gives the issuer-specific reason for card declines, only available for card or local payment methods based on card.last_payment_error.message to show user-friendly explanations.decline_code; system or network errors usually only have code."last_payment_error": {
"type": "card_error",
"code": "card_declined",
"decline_code": "payment_method_not_available",
"message": "Function/service not enabled"
}