Secure and streamline access to Klarna's Partner Portal by leveraging deep linking, SAML IdP, or the User Access Management API to manage roles and user permissions efficiently.
Klarna provides access to Booster features such as Express Checkout, On-site Messaging, and Sign in with Klarna, through the Klarna Portal. Access enables Partners to retrieve credentials and complete setup within Klarna’s ecosystem Acquiring Partners are required to grant access to the Klarna Portal to support these functionalities.
Key features of the Klarna Portal:
Partners cannot access features altering transaction statuses or privileged information, such as dispute or settlement management, unless otherwise enabled through their Acquiring Partner with Klarna.
Access is managed through roles assigned collaboratively by Klarna and the Acquiring Partner. Multiple access methods are supported; however, the recommended approach must be leveraged wherever possible. Alternative solutions may be agreed upon with Klarna based on technical or business constraints.
The presentation of any link between your Partner-facing admin portal must be agreed and signed off in accordance with Klarna’s user experience guidelines. Details are available in Klarna’s user experience guidelines.
Recommended Solution | Alternate Solutions | |
---|---|---|
Signed [https://docs.klarna.com/api/kn/klarna-management-api/klarna-management-api-v2-r6/#operation/createDeepLink Deep Linking]Use signed deep links secured with a JSON Web Token (JWT) to enable access without requiring password setup. Multi-factor authentication (MFA) is enforced on the Partner’s portal.Applicability: Suitable for all Acquiring Partners with a Partner-facing admin portal. | X | |
Unsigned [https://docs.klarna.com/api/kn/klarna-management-api/klarna-management-api-v2-r6/#operation/createDeepLink deep linking] to Klarna Portal:Relies on MFA enforced within the Klarna Portal and requires users to set up a password.Applicability: For Partners unable to support JWT-signed deep linking due to Klarna-approved limitations. | X | |
Acquiring Partner as identity provider (SAML IdP):Delegates authentication to the Acquiring Partner using SAML v2.0. No MFA is required on the Klarna Portal as MFA is managed by the Partner.Applicability: Ideal for Partners with advanced technical capabilities to implement SAML IdP, providing a seamless user experience. | X | |
Klarna Portal user management API:Grants API-based access for Partners without an admin portal to invite and manage users.Applicability: Suitable for Partners without admin portal capabilities. | X |
Deep linking facilitates seamless user access to Klarna’s Partner Portal via either a signed or unsigned method.
When the user clicks a link that should redirect to the Klarna Portal from the your portal, the acquiring partner should use the Deep link API and redirect the User to Klarna using the url from the response. You need to share the email address of the User that will then need to create or log-in their Klarna Portal Account.
By leveraging signed deep linking, the Acquiring Partner simplifies access to the Klarna Portal, avoiding password setup, supporting audit-ability of access, and ensuring non-repudiation. It can be enabled through the steps below:
Alternate: Unsigned deep linking
Should you not be able to sign a JWT with the requested information, it is possible to use the Deep link API as a regular REST endpoint. In this case, the user would be forced to set a password when accessing the Klarna Portal leading to an additional step in the user journey which we would rather avoid. Both approaches are shown below.
Deep links for Partners are created using a POST request to /v2/accounts/{account_id}/portal/deep-links and are valid for one-time use, expiring after 60 seconds. Deep links should only be requested after the Partner expresses a desire to enter the Klarna Portal, and may only be generated for accounts onboarded via your services. The provisioned accesses remain valid until the user is logged out from Klarna.
You can define the level of access granted to the user by setting the roles array.
The deep-link API returns a URL for redirecting the user to Klarna. Parameters vary based on the method used:
Type | Parameter | Definition |
---|---|---|
Header | alg | Algorithm is used to generate the signature.Accepts “ES256”. |
Header | typ | Accepts “JWT” only. |
Header | kid or x5c | Certificate serial number (kid) or the Certificate encoded (x5c). |
Payload | iss | PSP’s account ID, e.g. “krn:partner:global:account:live:LWT2XJSE”. |
Payload | jti | Token ID. Must be unique per request |
Payload | sub | The email address of the user. |
Payload | iat | Time at which the JWT was issued. Either an integer or decimal, representing seconds past 1970-01-01 00:00:00Z, e.g. “1422779638”. |
Payload | exp | Time at which the JWT expires. Either an integer or decimal, representing seconds past 1970-01-01 00:00:00Z, e.g. “1422779638”. The maximum interval after this value during which the JWT will be accepted is 1 minute. (i.e., if iat is more than 1 minute in the past, the JWT will no longer be valid.). |
Payload | amr | Array of authentication methods used.Accepts “pwd” and “mfa”, but “pwd” is at least required. |
Payload | account_id | ID of the sub-partner account, e.g. “krn:partner:global:account:live:LWT2XJSE”. |
Payload | roles[] | Roles given to the User once they access the Portal. Roles give privileges for specific operations. |
Signature | Computed signature following the JWT standard. |
Parameter | Definition |
---|---|
subject | The email address of the user. |
roles[] | Roles given to the User once they access the Portal. Roles give privileges for specific operations. |
session_token | When a Deep link is created due to the access to the Klarna User Access Provisioning URL, the session_token should be forwarded to Klarna. This session_token helps Klarna to redirect the User to the correct page they were looking for. It is a base64 token. |
Deep link access can be revoked at any time between its creation and session expiration, which occurs 8 hours after the link is generated.
Deep links for Partners can be manually revoked using a DELETE request to /v2/accounts/{account_id}/portal/deep-links/{deep_link_id}
{deep_link_id}
: the unique identifier received when creating a deep-link.{account_id}
: the account associated with the Partner.Manually revoking a deep link endpoint will be made available in future releases.
An Identity Provider (IdP) is a system that authenticates users and authorizes their access to applications and services. In this setup, The Acquiring Partner acts as the IdP and Klarna acts as the Service Provider (SP). By leveraging SAML v2.0, this setup ensures:
To enable Klarna Portal to leverage the Acquiring Partner as an IdP the following setup is required:
Step 1: Share SAML Configuration with Klarna
Step 2: Set Up Klarna Portal as the Service Provider
Step 3: Map User Attributes
Step 4: Handle SAML Authentication Requests
Step 5: Provision Access
The SAML IdP solution will be included in future releases. If you are interested in proceeding with this option for Partner Portal access please reach out to your Klarna representative to discuss further.
Klarna Portal accounts can also be created via the user access management API. This API is similar to deep linking, except instead of giving a user temporary access to the portal via a link, this creates (semi-)permanent access.
User access for Partners are created using a POST request to /v2/portal/user-access.
You can define the level of access granted to the user by setting the roles array.
We will create a Klarna Portal user for the supplied email (sub), give them access to the sub-account and send an invitation email to them, containing an activation link. The user will then need to follow the activation flow (accept T&Cs, update their given/family name, and set up their password and 2FA).
Type | Parameter | Definition |
---|---|---|
Header | alg | Algorithm is used to generate the signature.Accepts “ES256”. |
Header | typ | Accepts “JWT” only. |
Header | x5c | Certificate encoded (x5c). |
Payload | iss | PSP’s account ID, e.g. “krn:partner:global:account:live:LWT2XJSE”. |
Payload | jti | Token ID. Must be unique per request |
Payload | sub | The email address of the user. |
Payload | iat | Time at which the JWT was issued. Either an integer or decimal, representing seconds past 1970-01-01 00:00:00Z, e.g. “1422779638”. The maximum interval after this value during which the JWT will be accepted is 1 minute. (i.e., if iat is more than 1 minute in the past, the JWT will no longer be valid.). |
Payload | exp | Time at which the JWT expires. Either an integer or decimal, representing seconds past 1970-01-01 00:00:00Z, e.g. “1422779638”. |
Payload | account_id | ID of the sub-partner account, e.g. “krn:partner:global:account:live:LWT2XJSE”. |
Payload | roles[] | Roles given to the User once they access the Portal. Roles give privileges for specific operations. |
Payload | expires_at | (Optional) The date when the access expires in YYYY-MM-DD format, e.g. 2026-12-31. Must be a future date. |
Payload | inactivity_grace_period | (Optional) ISO 8601 duration string specifying how long the access remains valid after user inactivity, e.g. P30D for 30 days. Must be between 1 day and 6 months. |
Signature | Computed signature following the JWT standard. |
Inviting and managing users will be further defined in later releases.