Handling Invalid/Expired Tokens
There are scenarios where merchants need to re-initiate authorization. There are two ways on how the merchant is notified of invalid tokens:
- During direct debit. If the response has the failure reason:
INVALID_PAYMENT_METHOD_ERROR
- Via callback. Merchant may provide Xendit an endpoint for Xendit to send a POST request notifying the merchant that this specific account has been determined to be expiring or has become invalid. The callback parameters are specified below:
Expiring Payment Method
Sends a callback object when a certain access token tied to a payment method is determined to be expiring.
Expiring Payment Method - Callback Object
Name | Description |
---|---|
event | payment_method.expiry.expiring |
timestamp | Timestamp of the event |
id | ID for particular authorization (payment method) |
customer_id | Xendit-generated customer ID |
expiration_timestamp | Timestamp when the token will expire |
>Expiring Payment Method - Sample Callback Object
{
"event": "payment_method.expiry.expiring",
"timestamp": "2020-03-27T05:45:06+0800",
"id": "lat-aa620619-124f-41db-995b-66a52abe036a",
"customer_id": "cus-239c16f4-866d-43e8-9341-7badafbc019f",
"expiration_timestamp": "2020-03-29T05:45:06+0800"
}
Invalid/Expired Payment Method
Sends a callback object when a certain access token tied to a payment method is determined to be invalid.
Invalid/Expired Payment Method - Callback Object
Name | Description |
---|---|
event | payment_method.expiry.expired |
timestamp | Timestamp of the event |
Invalid/Expired Payment Method - Sample Callback Object
{
"event": "payment_method.expiry.expired",
"timestamp": "2020-03-27T05:45:06+0800",
"id": "pmthd-c30d4800-afe4-4e58-ad5f-cc006d169139",
"customer_id": "cus-239c16f4-866d-43e8-9341-7badafbc019f"
}
Need more assistance? Feel free to reach out to our Customer Success or your Indonesia or Philippines Xendit Sales for further assistance.
Last Updated on 2023-05-20