When a Klarna customer token has been created, you can read the content of it through doing a read on it. The read will return the status of the token as well as payment method details.
For a description of the status in the lifecycle of a token, please read the token lifecycle article.
Path: GET /customer-token/v1/tokens/{customerToken}
Headers:
Content-Type: application/json
Empty body request
Description: Token was successfully read.
Headers:
Status Code: 200
Content-Type: application/json
{
"card": {
"brand": "VISA",
"expiry_date": "12/2020",
"masked_number": "**1234"
{
"correlation_id": "6a9b1cb1-73a3-4936-a030-481ba4bb203b",
"error_code": "ERROR_CODE",
"error_messages": [
"ERROR_MESSAGE"
]
}
Best practice: You can use the correlation_id
to troubleshoot the call in the logs app in merchant portal.
Error Code | Error message | Comment |
---|---|---|
NOT_FOUND | Invalid customer-token ID | The token you attempted to read is not valid anymore. Or the ID is incorrectly formatted. |