Klarna Partner Product API - Identity (v2/r6)

Download OpenAPI specification:Download

Identity API

Introspect a customer token issued in the account linking flow.

Introspect a customer token issued in the account linking flow to obtain more information regarding the token.


SLO Category: The SLO Service Category. Operations that provide read access to verify if a customer has an existing Klarna account or to retrieve details from an account linking token.Read-Only Identity
SLA Service Class: The SLA Service Class this operation is classified at when evaluating SLA compliance. Operations, webhooks and other services that does not directly impact the core purchasing process in real-time and enables supplemental or secondary featuresTransactions Non-critical Services
Lifecycle Stage: The Lifecycle Stage tag in operations and attributes defines completeness of the feature for usage Feature under development, may not be fully available and is subject to change as we continue building the service in partnership with early usersEarly Release
Availability in Test environment: Indicates if the feature is available in the Klarna Test environment Feature is available in the Klarna Test environmentAvailable
Availability in Production environment: Indicates if the feature is available in the Klarna Production environment Feature is available in the Klarna Production environmentAvailable

Securityklarna_api_key
Request
path Parameters
partner_account_id
required
string (AccountIdentifier)

The unique identifier of the account for which the action is performed.

Example: krn:partner:global:account:live:LWT2XJSE
validation-info: Validation that is a valid krn
header Parameters
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 customer_id as the unique identifier.

Example: krn:partner:us1:live:identity:customer-token:vVQGmYzlfsQ16dko3jcwY5lV8hBgKs9a
validation-info: Validation on the length (max length 1024) and the format of the string.
required
object

Metadata about the integrator and originators of the request in n object, serialized as a valid JSON

Example: object=[object Object]
Responses
200

Successful response

400

Bad Request, there was an error in the input of the request. The request can not be retried without modifications.

401

Unauthorized, the request was not authorized.

403

Unauthorized access to the resource customer token.

404

Resource customer token does not exist.

409

Resource customer token has been revoked.

429

Too Many Requests, the request was rate limited.

500

Internal Server Error, there was an unexpected error in the API.

503

Service Temporarily Unavailable, the system is temporarily unavailable to process the request.

post/v2/accounts/{partner_account_id}/identity/customer-token/introspect
Request samples
Response samples
application/json
{
  • "status": "ACTIVE",
  • "scopes": [
    ],
  • "issued_at": 1723791546323,
  • "customer_token_reference": "partner_customer_token_1234"
}

Revoke a customer token issued in the account linking flow.

Revoke a customer token issued in the account linking flow, so that any subsequent payment requests using the token are rejected.


SLO Category: The SLO Service Category. Operations that allow the revocation or updates of a customer token issued during the account linking process.Identity
SLA Service Class: The SLA Service Class this operation is classified at when evaluating SLA compliance. Operations, webhooks and other services that does not directly impact the core purchasing process in real-time and enables supplemental or secondary featuresTransactions Non-critical Services
Lifecycle Stage: The Lifecycle Stage tag in operations and attributes defines completeness of the feature for usage Feature under development, may not be fully available and is subject to change as we continue building the service in partnership with early usersEarly Release
Availability in Test environment: Indicates if the feature is available in the Klarna Test environment Feature is available in the Klarna Test environmentAvailable
Availability in Production environment: Indicates if the feature is available in the Klarna Production environment Feature is available in the Klarna Production environmentAvailable

Securityklarna_api_key
Request
path Parameters
partner_account_id
required
string (AccountIdentifier)

The unique identifier of the account for which the action is performed.

Example: krn:partner:global:account:live:LWT2XJSE
validation-info: Validation that is a valid krn
header Parameters
required
CustomerToken (string) or PurchaseTokenId (string)
required
object

Metadata about the integrator and originators of the request in n object, serialized as a valid JSON

Example: object=[object Object]
Responses
200

Successful response

400

Bad Request, there was an error in the input of the request. The request can not be retried without modifications.

401

Unauthorized, the request was not authorized.

403

Unauthorized access to the resource customer token.

404

Resource customer token does not exist.

409

Resource customer token has been revoked.

429

Too Many Requests, the request was rate limited.

500

Internal Server Error, there was an unexpected error in the API.

503

Service Temporarily Unavailable, the system is temporarily unavailable to process the request.

Callbacks
postWebhook: Customer-token revoked
post/v2/accounts/{partner_account_id}/identity/customer-token/revoke
Request samples
Response samples
application/json
{
  • "customer_token_reference": "partner_customer_token_1234"
}
Callback payload samples
POST: Webhook: Customer-token revoked
application/json
{
  • "metadata": {
    },
  • "payload": {
    }
}