Download OpenAPI specification:Download
The Identity Request API allows you to create and manage the lifecycle of an identity request.
Introspect a customer token issued in the account linking flow to obtain more information regarding the token.
X-Klarna-Customer-Token required | string (CustomerToken) <= 1024 characters Returned if Account Linking or payment tokenization was requested. The customer token represents the tokenized customer and allows you to act
on behalf of the customer. You must persist this token in your system associated with the customer
account. To de-duplicate customers, you should use the Example: krn:partner:us1:live:identity:customer-token:vVQGmYzlfsQ16dko3jcwY5lV8hBgKs9a validation-info: Validation on the length (max length 1024) and the format of the string. |
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Successful response
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Unauthorized access to the resource customer token.
Resource customer token does not exist.
Resource customer token has been revoked.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
{- "status": "ACTIVE",
- "scopes": [
- "payment:customer_present",
- "customer:login"
], - "issued_at": 1723791546323,
- "customer_token_reference": "partner_customer_token_1234"
}
Revoke a customer token issued in the account linking flow, so that any subsequent payment requests using the token are rejected.
required | CustomerToken (string) or PurchaseTokenId (string) |
object Metadata about the integrator and originators of the request, serialized as a valid JSON, to improve troubleshooting. Read more here Example: integration_metadata=[object Object] | |
Partner-Correlation-Id | string <= 255 characters ^[A-Za-z0-9]+$ An optional alpha numerical String that the partner can use to correlate. This value will be returned in the response. |
Successful response
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Unauthorized access to the resource customer token.
Resource customer token does not exist.
Resource customer token has been revoked.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
{- "customer_token_reference": "partner_customer_token_1234"
}
{- "metadata": {
- "event_type": "identity.customer-token.state-change.revoked",
- "event_id": "7f1ff389-7792-4cc5-8ec5-cb2ed6e1f19c",
- "event_version": "v2",
- "occurred_at": "2024-01-12T13:00:00Z",
- "correlation_id": "2d1557e8-17c3-466c-924a-bbc3e91c2a02",
- "subject_account_id": "krn:partner:global:account:live:HGBY07TR",
- "recipient_account_id": "krn:partner:global:account:live:LWT2XJSE",
- "webhook_id": "krn:partner:global:notification:webhook:120e5b7e-abcd-4def-8a90-dca726e639b5",
- "live": true
}, - "payload": {
- "customer_token": "krn:partner:us1:live:identity:customer-token:vVQGmYzlfsQ16dko3jcwY5lV8hBgKs9a",
- "customer_token_reference": "partner-token-reference-1234"
}
}