Read Klarna customer token

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.

Date: 11.07.2019

For a description of the status in the lifecycle of a token, please read the token lifecycle article .

Request example

1
2
3
4
Path: GET /customer-token/v1/tokens/{customerToken}
Headers:
Content-Type: application/json
Empty body request

Responses

Example successful response

  • Please note that responses will differ dependent on the payment method of the token.*
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Token was successfully read.
Headers:
Status Code: 200
Content-Type: application/json

{
    "card": {
        "brand": "VISA",
        "expiry_date": "12/2020",
        "masked_number": "**1234"
    },
    "direct_debit": {
        "brand": "string",
        "masked_number": "**124"
    },
    "payment_method_type": "INVOICE",
    "status": "ACTIVE"
}

Example error responses

1
2
3
4
5
6
7
{
    "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.

Possible error codes and messages

Error CodeError messageComment
Error Code
NOT_FOUND
Error message
Invalid customer-token ID
Comment
The token you attempted to read is not valid anymore. Or the ID is incorrectly formatted.