The last_payment_error object provides information about the latest payment that failed. It includes details such as a readable message, error identifiers, and any codes from the card issuer or payment network explaining why the transaction was declined. This information can guide developers in handling errors properly or displaying clear messages to users.
{
"last_payment_error": {
"code": "string",
"decline_code": "string",
"message": "string",
"type": "card_error"
}
}