Implement the recommended access solution featuring two entry points: deep linking from your portal and an AP button on Klarna's login page. This complete package provides secure, passwordless access with the best user experience.
A button or link in your Partner-facing admin portal that uses the Deep Link API to provision access and redirect Partners directly to Klarna Partner Portal.
Partners already logged into your portal who want to access Klarna features.
From Klarna Partner Portal login
A button on Klarna Partner Portal's login page that redirects Partners to your authentication system, then provisions access via Deep Link API.
Partners starting their journey from Klarna Partner Portal or bookmarking Klarna Partner Portal directly.
Both entry points use the same Deep Link API and JWT signing mechanism. You only need to implement the JWT generation once to enable both entry points.
Before implementing this solution, ensure you have completed the common prerequisites.
Additionally, you will need:
Public-facing URL (for Klarna Partner Portal login) where Partners can authenticate
Important: This method requires JWT signing with a client certificate. If you haven't completed the JWT setup yet, follow the JWT signing setup in the Overview page first.
Note: The amr (authentication methods reference) field is required for deep linking. Use ["pwd"] to indicate password authentication is implemented on your side.
The JWT uses payload version: 2. Grant access through the accesses array (up to 100 entries) and set a single top-level on_behalf_of for the whole request.
Claim
Description
version
Required. Payload version. Set to 2.
on_behalf_of
Required. The Partner Account the user represents in Klarna Partner Portal. For a Partner accessing its own account, use that same Partner Account ID. When you act as an Acquiring Partner on behalf of the Partner Accounts you manage, use your own Partner Account ID.
accesses
Required. List of access entries (1–100) to grant in a single request.
accesses[].partner_account_id
Required. The Partner Account the user gets access to.
accesses[].roles
Required. The roles to assign for that Partner Account.
accesses[].access_policy_id
Optional. An access policy that narrows which Payment Accounts the user can see within that Partner Account. It must belong to the entry's partner_account_id.
Granting access to multiple Partner Accounts: Add one entry to accesses per Partner Account to grant a user access to several Partner Accounts in a single request. Use access_policy_id on an entry to restrict visibility to a subset of that Partner Account's Payment Accounts; an access policy can only narrow access, never widen it.
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.
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.
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.
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.
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
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:
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.
This entry point displays a "Continue with [Acquiring Partner]" button on Klarna Partner Portal's home screen. When Partners click this button, they are redirected to your authentication system.
Extract the deeplink_session_token from the query parameters
Generate your signed JWT (same process as Entry Point 1)
Call the createPortalDeepLink endpoint with the JWT, including the deeplink_session_token from Klarna
Redirect the Partner to the URL returned by the Deep Link API
sequenceDiagram
participant A as User
participant B as Klarna Portal
participant C as Acquiring Partner Portal
participant D as Management API
A->>B: User clicks "Continue with Acquiring Partner" button
B->>A: Redirect to AP's Klarna Access Provision URL<br/> with {deeplink_session_token}
A->>C: Load Klarna Access Provision URL
opt If the user is not already authenticated with the Acquiring Partner system
A->>C: Enter credentials
C->>C: Authenticates
end
C->>D: Creates short lived deep-link URL
alt Signed request (JWT) - Klarna will require 2FA only for the User to log in
Note over C,D: 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 C,D: 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/> "deeplink_session_token": "<<deeplink_session_token>>"<br/>}
end
D -->>C: 201
note over C,D: {<br/>"url": "https://auth.eu.portal.klarna.com/..."<br/>}
C -->>A: 201
note over A,C: {<br/>"url": "https://auth.eu.portal.klarna.com/..."<br/>}
A ->>B: User is redirected to the Klarna Portal
Following these steps will enable the "Continue with [Acquiring Partner]" button on Klarna Partner Portal's login screen and ensure a secure and streamlined login experience for Partners.
If you cannot implement signed JWT deep linking due to technical constraints, unsigned deep linking is available as a fallback.
Not Recommended: This approach requires users to set up a password when accessing Klarna Partner Portal, adding an additional step that degrades user experience. Only use this if signed deep linking cannot be implemented.
With unsigned deep linking:
You call the Deep Link API without providing a JWT
You provide the user's email address (subject), the top-level on_behalf_of, and the accesses array directly
MFA is enforced within Klarna Partner Portal (instead of your portal)