This page details how to read a Kustom customer token, retrieving its status and payment method information.
To read a customer token, use a GET request to the /customer-token/v1/tokens/{customerToken} endpoint.
Path: GET /customer-token/v1/tokens/{customerToken}
Content-Type: application/jsonThis example shows a successful read of a token, including card details. Note that responses will vary based on the payment method.
Description: Token was successfully read.
Status Code: 200
Content-Type: application/json
{
"card": {
"brand": "VISA",
"expiry_date": "12/2020",
"masked_number": "**1234"
},
"direct_debit": {
"masked_number": "**124"
},
"payment_method_type": "INVOICE",
"status": "ACTIVE"
}This example demonstrates an error response.
{
"correlation_id": "6a9b1cb1-73a3-4936-a030-481ba4bb203b",
"error_code": "ERROR_CODE",
"error_messages": [
"ERROR_MESSAGE"
]
}| Error Code | Error message | Comment |
|---|---|---|
| NOT_FOUND | Invalid customer-token ID | The token is not valid or the ID is incorrect. |
Best practice: Use the correlation_id for troubleshooting in the Kustom portal logs.