Integrate Payment Presentation API to display branded payment options when SDK use isn’t feasible, ensuring a consistent and compliant checkout experience.
If Acquiring Partners cannot use the Klarna SDK to retrieve the presentation instruction due to infrastructure constraints on their end, they must utilize Klarna Payment Presentation API to retrieve the assets and instructions necessary to build the payment selector.
The Klarna Payment Presentation API enables Acquiring Partners to retrieve Klarna-branded presentation assets (e.g. button text, icons, descriptors) tailored to a specific payment context. These assets help Partners render Klarna in compliance with Klarna’s brand and UX guidelines.
Before calling Klarna’s Payment Presentation API, ensure your backend accepts and forwards the Klarna specific parameters. These include the interoperability token which preserve session context as well as basic transaction parameters (amount, currency, locale) which will allow Klarna to deliver tailored assets to build the payment form.>
Klarna Presentation API's require an interoperability token in order to provide personalized features when displaying Klarna in the payment form.
If an interoperability token was provided by the Partner requesting a checkout form, it must be forwarded to Klarna in headers.
In the request to the Payment Presentation API, the Acquiring Partner will specify the following parameters:
Parameter | Description |
partner_account_id | The unique identifier of the Partner account. This is used to scope the request. |
Parameter | Description |
Klarna-Interoperability-Token | Must contain the interoperability token if provided by the Partner. |
Parameter | Description |
locale | The locale to use for localization of Klarna assets (IETF BCP 47 format e.g., en-US , fr-FR ). |
amount | The total payment amount in minor units (e.g., 11836 = $118.36). |
currency | ISO 4217 3-letter currency code (e.g., USD , EUR ). |
intents | List of requested intents. Currently, ["PAY"] is the supported value. |
Sample request body
{
"locale": "en-US",
"amount": 11836,
"currency": "USD",
"intents": ["PAY"]
}
The response from Klarna will contain the following parameters:
Field | Type | Description |
instruction | string | Klarna display instruction (e.g., SHOW_KLARNA , HIDE_KLARNA , etc.). |
payment_button | object | Contains the label to be used on the Klarna payment button. |
descriptor | object | Contains all Klarna display assets for the payment selector, including:
|
Sample response
{
"instruction": "SHOW_KLARNA",
"payment_button": {
"text": "Pay with Klarna"
},
"descriptor": {
"header": {
"text": "Pay with Klarna"
},
"subheader": {
The Acquiring Partner must used the assets returned by the presentation API (text, link, instruction) to display Klarna when loading the checkout form. In this step it is needed to present to the customer Klarna as an available payment method and initially only 3 elements should be presented to the customer:
The Acquiring Partner must use the instruction
attribute returned in the response to the Payment Presentation API to dynamically build the payment selector. The instruction
attribute will contain one of the following values:
SHOW_KLARNA
PRESELECT_KLARNA
SHOW_ONLY_KLARNA
HIDE_KLARNA
The presentation instructions indicate Acquiring Partners how Klarna should be presented in the payment selector. Acquiring Partners are required to adhere to Klarna’s payment presentation instruction to achieve the best-in-class user experience.
The presentation instructions are derived from possible customer purchase journeys described in the following article.
The links present in the api response(enriched.link.href
), must be opened only a new tab or new window. Please avoid using iframes.
Once the customer has decided to proceed to the Payment using Klarna, or if Klarna was pre-selected due to the presentation instruction seen above, Acquiring Partners have to refresh the layout, build and present the Klarna Enriched Subheader as well as payment button using the assets (text, link) provided by the Payment Presentation API.