Build the payment form

Enable a seamless checkout experience by integrating its payment presentation and interoperability features to enhance the checkout experience with up-to-date payment method listings.

​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:

  1. Accept klarna_network_session_token and klarna_network_data in requests.
  2. Call Klarna’s Payment Presentation APIKlarna Icon to fetch the most up-to-date Klarna content.
  3. Include Klarna-specific display instructions and assets (labels, icons, etc.) in the API response sent to Partners.

Example of the payment selector built by a Partner when the Acquiring Partner enables this support:

Initial presentationWhen Klarna is selected

This step only applies to Acquiring Partners that have APIs that allow Partners to retrieve available payment methods.

When Partners optimize their integration with Klarna, they are likely to have Klarna Network data points to share with the Acquiring Partner. These data points enable interoperability between the Boost Features and Payment Presentation or Payment Authorization.

ParameterPurpose

klarna_network_session_token

Encodes Klarna-specific session context (e.g., preselected payment option, pre-qualification results).

klarna_network_data

Submit supplementary purchase data directly to Klarna

These ensure consistent customer and transaction context throughout the payment flow and must be forwarded unaltered to Klarna.

Enable interoperability for Payment PresentationEnable interoperability for Payment Authorization

Implementation requirements

  • Accept the Klarna Network parameters in the Partner-facing payment request API.
  • Forward the Klarna Network parameters unmodified to Klarna’s Payment Authorization API.
  • Validation can and should be implemented, but it must not be more restrictive than what is specified in Klarna’s Payment Authorize APIKlarna Icon. Make sure that all special characters permitted by the API specification are accepted.

The Partner-facing field should be named klarna_network_session_token/klarna_network_data, ensuring that it’s easy for any Partner to identify and use.
The Acquiring Partner can validate the input based on the provided guidelines but must not modify it. The input must always be forwarded as received, without any interference.

Below an example of how Acquiring Partners can accept the Klarna Network parameters in their Payment request API endpoint.

Sample request

Payment PresentationKlarna Icon

Copied

GET:/v2/accounts/{partner_account_id}/payment/presentation
Show recommended
ParameterRequiredDescription

Copied

partner_account_id
Yes

Unique account identifier assigned by Klarna to the onboarded merchant

Here you can find all required parameters for this operation getPresentationAPIKlarna Icon

​

Your API response (e.g., for Get Payment Methods) should include the Klarna assets returned in the response from the Payment Presentation API, so your Partner can render the payment method correctly.

You have two options:

  1. Map individual fields: Extract and structure the response from Klarna’s Payment Presentation API and map relevant keys (e.g., descriptor, payment_button) into your API response format.
  2. Serialize the entire response: Alternatively, you may populate a single field—klarna_payment_presentation_data—with a serialized version (e.g., JSON string) of the full response obtained from Klarna’s Payment Presentation API. This avoids the need to map each field individually.
JSON

Copied

{
  "payment_methods": [{
    "name": "VISA",
    "type": "scheme"
  }, {
    "name": "Pay with Klarna",
    "type": "klarna",
    "klarna_payment_presentation_data": "{\"instruction\":\"SHOW_KLARNA\",...}"
  }]
}

You may structure the response to fit your API format, but ensure that the Klarna presentation data is clearly identifiable. Use a field name like:

  • klarna_payment_presentation_data
  • or payment_presentation_data (when used specifically for Klarna)

This makes it easy for Partner integrations to parse and use Klarna presentation data dynamically.