Use the
Create a deep link endpoint (
createPortalDeepLink
) for all new integrations. It grants a user access to one or more Partner Accounts in a single request through the
accesses array, with an optional access policy per Partner Account.
| Endpoint | When to use |
|---|
Create a deep link (createPortalDeepLink ) | Recommended. Grant a user access to one or more Partner Accounts in a single request through the accesses array, with an optional access policy per Partner Account. Also covers single-account access with one accesses entry. |
Create account deep link (createDeepLink ) | Deprecated. Grants a user access to a single Partner Account, set in the {partner_account_id} path parameter with one set of roles. Use Create a deep link instead. |
Both endpoints accept either a signed JWT (recommended) or an unsigned JSON body, return the same response, and produce a one-time link that expires in 60 seconds.
On success, Create a deep link responds with 201 Created and Create account deep link responds with 200 OK, returning a JSON payload that includes a url property to use as the deep link.
Important characteristics:
One-time use: Each deep link can only be used once
Expires in 60 seconds: Request a new link if not used immediately
Session timeout: The session automatically stops after 8 hours of inactivity.
Integration requirement
Only request deep links when the Partner explicitly wants to enter Klarna Partner Portal. Deep links may only be generated for accounts onboarded via your services.
The
createPortalDeepLink
endpoint grants access to one or more Partner Accounts in a single call, using the JWT you built above.
Request payload:
1
2
3
4
{
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.<....>SMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
sequenceDiagram
participant A as User
participant B as Acquiring Partner
participant C as Management API
participant D as Klarna Portal
A->>B: User clicks "Go to Klarna"
B->>C: Creates short lived deep-link URL
alt Signed request (JWT) - Klarna will require 2FA only for the User to log in
Note over B,C: POST /v2/portal/deep-links <br/> <<Signed JSON Web Token (JWT)>>
else Unsigned request - Klarna will require both password and 2FA to log in
note over B,C: POST /v2/portal/deep-links <br/> {<br/>"subject": "john.doe@example.com",<br/>"on_behalf_of": "krn:...",<br/>"accesses": [{<br/>"partner_account_id": "krn:...",<br/>"roles": ["merchant:admin"]<br/>}]<br/>}
end
B -->>C: 201
note over B,C: {<br/>"url": "https://auth.eu.portal.klarna.com/..."<br/>}
B -->>A: 201
note over A,B: {<br/>"url": "https://auth.eu.portal.klarna.com/..."<br/>}
A ->>D: User is redirected to the Klarna Portal
Integration requirement
Deprecated: The account deep link endpoint (
createDeepLink
) is deprecated. Use
Create a deep link
instead, which covers single-account access with a single
accesses entry.
The
createDeepLink
endpoint grants access to a single Partner Account, identified by the
{partner_account_id} path parameter. Use it when you provision access to one Partner Account at a time.
For the signed flow, build a JWT with these claims:
| Claim | Description |
|---|
iss | Required. Partner Account ID of the requesting Partner. |
jti | Required. Unique token ID. We recommend a UUID. |
sub | Required. Email of the user to grant access to. |
iat | Required. Issued-at timestamp, in seconds since the Unix epoch. |
exp | Required. Expiry timestamp, in seconds since the Unix epoch. No more than 60 seconds after iat. |
amr | Required. Authentication methods implemented on your side, e.g. ["pwd"]. |
account_id | Required. The Partner Account the user gets access to. |
on_behalf_of | Optional. The Partner Account the user represents. Defaults to account_id. |
roles | Required. The roles to assign. |
deeplink_session_token | Optional. Forward the token Klarna adds to your Klarna Access Provision URL. |
If you can't sign a JWT, send the same details in an unsigned body instead:
1
2
3
4
5
6
{
"subject": "john.doe@example.com",
"roles": ["merchant:admin"],
"on_behalf_of": "krn:partner:global:account:live:LYABCDEI"
}
Single-account scope only
Unlike Create a deep link, this endpoint grants access to one Partner Account per request and doesn't accept the accesses array or per-entry access policies.