Integrate Klarna's Payment Presentation API for server-side flows. This guide shows how to retrieve dynamic Klarna assets and forward them to Partners for building their own payment selector.
This guide explains how to provide dynamic Klarna assets to Partners using Klarna's Presentation API, enabling them to create their own payment selector in line with Klarna's best practices.
Below is a step-by-step overview for supporting dynamic payment method listing:
klarna_network_session_token in requests.![]() | ![]() |
| Initial presentation | When Klarna is selected |
This step only applies to Acquiring Partners that have APIs that allow Partners to retrieve available payment methods.
The following diagram illustrates the server-side Payment Presentation flow:
klarna_network_session_token
Below is an example of how Acquiring Partners can accept the Klarna Network parameters in their Partner-facing APIs.
{
"currency": "USD",
"amount": 17800,
"payment_method_options": {
"klarna": {
"klarna_network_session_token": "krn:network:us1:test:session-token:eyJhbGciOiJIU[...]"
}
}
}Requirements
klarna_network_session_token, ensuring that it's easy for any Partner to identify and use.Acquiring configuration for multi-payment-account Partners
If you are an Acquiring Partner with multiple Payment Accounts, include the acquiring_config query parameter to specify which Payment Account to use. For Partners with a single Payment Account, omitting acquiring_config is allowed — Klarna automatically uses the only available Payment Account.
Provide one of the following combinations — not both:
acquiring_config[payment_acquiring_account_id] + acquiring_config[payment_account_reference]acquiring_config[payment_account_id]curl -G https://api-global.test.klarna.com/v2/accounts/{partner_account_id}/payment/presentation \
-H 'Authorization: Basic <API key>' \
-H 'Content-Type: application/json' \
-H 'Klarna-Network-Session-Token: krn:network:us1:test:session-token:eyJhbGciOiJIU[...]' \
--data-urlencode 'locale=en-US' \
--data-urlencode 'amount=15000' \
--data-urlencode 'currency=USD' \
--data-urlencode 'intent=PAY'When calling the getPresentationAPI endpoint with a Customer Token, the response will have an additional
saved_payment_option object.
curl -G https://api-global.test.klarna.com/v2/accounts/{partner_account_id}/payment/presentation \
-H 'Authorization: Basic <API key>' \
-H 'Content-Type: application/json' \
-H 'Klarna-Network-Session-Token: krn:network:us1:test:session-token:eyJhbGciOiJIU[...]' \
-H 'Klarna-Customer-Token: krn:partner:us1:test:identity:customer-token:ACZawkw7-2[...]' \
--data-urlencode 'locale=en-US' \
--data-urlencode 'amount=15000' \
--data-urlencode 'currency=USD' \
--data-urlencode 'intent=PAY'If your API supports preselecting payment methods, account for the instruction property returned by the getPresentationAPI. Preselect Klarna when instruction is set to
PRESELECT_KLARNA.
Your API response (e.g., for Get Payment Methods) should include the Klarna assets returned from the Payment Presentation API so Partners can render the payment method correctly.
Extract and structure the response from Klarna's Payment Presentation API and map relevant keys into your API response format.
The getPresentationAPI returns multiple properties within the
payment_option and saved_payment_option objects. Map these properties to fields in your API response format based on what your Partner-facing API supports:
| Property Path | Description |
|---|---|
{...}.header.text | The primary label that identifies Klarna as a payment option (e.g., "Pay with Klarna"). Map to whatever field your API uses for the payment method's display name or title. |
{...}.subheader.text | A secondary descriptive line that provides additional context about the Klarna offering (e.g., "Plans from 0% interest"). Map to a field like subtitle, description, or tagline in your payment method object. |
{...}.icon.badge_image_url | URL to a curved-edged badge-style Klarna logo. Map to the icon or logo URL field for displaying the Klarna brand mark next to the payment method name. |
{...}.icon.square_image_url | URL to a square-shaped Klarna logo. Use this if your UI requires square icons instead of badge-shaped icons. |
{...}.icon.rectangle_image_url | URL to a rectangular Klarna logo containing just the 'K' symbol. Use this for compact layouts where space is limited. |
{...}.icon.alt | Alternative text for the icon (typically "Klarna"). Map to the alt text or accessibility label for the icon image. |
{...}.payment_option_id | An opaque identifier for the specific Klarna payment offer. Include this if your API tracks which payment option variant was presented, but treat it as a black box (do not parse or interpret it). |
{...}.badge.text | A small label (e.g., "Saved") that appears on the payment option in certain contexts. Map to a badge or tag field if your API supports visual indicators on payment methods. |
{...}.terms.parts | An array of text and link segments containing legal terms or disclosures. Map to a terms or legal text field if your API requires displaying regulatory information alongside payment methods. |
If your API has a simple structure, map these essential fields:
{
"payment_methods": [{
"type": "klarna",
"name": "<payment_option.header.text>",
"subtitle": "<payment_option.subheader.text>",
"icon_url": "<payment_option.icon.badge_image_url>",
"display_instruction": "<instruction>"
}]
}If your API supports rich payment method presentation, map additional fields:
{
"payment_methods": [
{
"type": "klarna",
"header": "<payment_option.header.text>",
"subheader": "<payment_option.subheader.text>",
"icons": {
"badge": "<payment_option.icon.badge_image_url>",
"square": "<payment_option.icon.square_image_url>",
"rectangle": "<payment_option.icon.rectangle_image_url>",
"alt_text": "<payment_option.icon.alt>"
},API & SDK references