Server-side only integration

Understand how the server-side-only integration model works when an Acquiring Partner offers Klarna as a payment method and orchestrates all communication with Klarna on behalf of their Partners.

Link copied!

In a server-side-only integration, the Acquiring Partner is the only system that integrates directly with Klarna’s APIs. Partners may build, host and maintain their own checkout and payment forms, but they send all payment-related data to the Acquiring Partner, who then interact with Klarna services.

In this integration method, the Partner typically uses the Acquiring Partner's APIs to:

  • Retrieve a list of available payment methods.
  • Obtain a Klarna payment URL for redirecting the customer.

Understand how the end-to-end payment flow for this integration method works, from payment method presentation through authorization and optional Step-up.

In this integration method, each party has a distinct role:

Link copied!

  • Owns the customer-facing checkout page and payment form.
  • Presents Klarna as a payment method according to Klarna’s presentation guidelines.
  • Collects customer and order details and passes them to the Acquiring Partner, including all required Klarna Network Data.
  • Redirects or launches the Klarna Purchase Journey when instructed by the Acquiring Partner.
  • Exposes server-side APIs that Partners call to start and manage payments with Klarna.
  • Validates incoming data from Partners, including Klarna Network Data.
  • Calls Klarna’s Payment Authorize API to create and authorize Payment Transactions on behalf of the Partner.
  • Handles Step-Up flows, including receiving Klarna Purchase URLs or Payment Request IDs and returning them to the Partner.
  • Subscribes to and processes Klarna Webhook Events, then notifies Partners about payment results.

Link copied!

  • Provides payment presentation assets and product configuration.
  • Evaluates risk and determines whether a Step-Up flow is required.
  • Hosts the Klarna Purchase Journey when Step-Up is triggered.
  • Returns payment decisions (approved or declined) and sends Webhook Events to the Acquiring Partner.

To support Klarna in a server-side-only integration, Acquiring Partners are expected to:

  • Provide clear, high-quality technical documentation that explains how Partners should:
  • Verify that the Partner’s checkout implementation complies with Klarna’s requirements for displaying and promoting Klarna Payment Services.
  • Accept and forward all required Klarna Network data points from the Partner to Klarna as defined in Klarna’s interoperability standards.
  • Implement support for Klarna’s Step-Up flow, including:
    • handling Klarna Purchase URLs or Payment Request IDs returned during authorization, and
    • managing additional authorization steps required by Klarna.

Link copied!

Before supporting this server-side-only integration method, the Acquiring Partner must have:

  • A server-side API for Partners' that:
    • returns available payment methods (including Klarna), and
    • accepts payment initiation requests for Klarna.
  • A payment server that uses Klarna’s Payment Authorize API to:
    • perform initial and final authorization calls, and
    • create Payment Transactions.
  • A webhook listener that:
    • subscribes to Klarna Webhook Events, and
    • updates internal payment state and notifies Partners when the Payment Transaction is completed (approved or declined).

Where applicable, the Acquiring Partner should also maintain:

  • Configuration mapping between Partner identifiers and Klarna resources (such as Partner Account and Payment Profiles).
  • Monitoring and logging for Klarna API calls and Webhook processing.
  1. The customer navigates to the Partner’s checkout page.
    1. The customer navigates to the Partner’s checkout page.
    2. The Partner’s backend prepares the order data and retrieves available payment methods, either:
      1. directly from Klarna’s payment presentation services (if allowed by the integration), or
      2. from the Acquiring Partner’s API, which returns configured payment methods including Klarna and their descriptors.
    3. The Partner’s checkout uses this information to present Klarna in line with Klarna’s presentation guidelines.
  2. The Partner displays a payment selector to the customer, with Klarna listed as a payment method.
    1. The Partner shows a payment method selector that includes Klarna.
    2. The Partner’s payment form collects relevant customer and order information (for example, billing and shipping addresses, order lines, and Klarna Network Data fields required by Klarna).
    3. When the customer selects Klarna as the preferred payment method and clicks the Klarna button, the Partner sends a server-side request to the Acquiring Partner to initiate a Klarna payment.
    4. The Partner’s request to the Acquiring Partner must include:
      1. identification of the Partner and the transaction,
      2. all required Klarna Network Data attributes, and
      3. information needed to construct the Klarna Payment Request.
  3. The Partner initiates a payment session with the Acquiring Partner. Upon receiving the request:
    1. The Acquiring Partner validates the Partner’s data, including Klarna Network Data.
      1. The Acquiring Partner creates a Payment Request towards Klarna by calling the Payment Authorize API.
      2. Klarna evaluates the request and either:
      3. approves the transaction immediately, or
      4. determines that a Step-Up flow is required.
    2. At this stage, no Klarna Purchase Journey has yet been shown to the customer unless Step-Up is triggered. The Acquiring Partner must support one of the following modes to launch the Klarna Purchase Journey:
      1. Redirect mode: Returns a Klarna payment URL for the Partner to redirect the customer.
      2. SDK mode: Returns a Klarna Payment Request ID for the Partner to initiate the purchase flow using Klarna’s SDK.
  4. The Acquiring Partner calls Klarna’s Payment Authorize API, forwarding the Klarna Network data points provided by the Partner. Depending on Klarna’s decision, the flow branches:
    1. Happy path:
      1. Klarna returns an approved decision from the Payment Authorize API.
      2. The Acquiring Partner updates its Payment Transaction state to approved.
      3. The Acquiring Partner notifies the Partner (via synchronous response or webhook) that the order is confirmed.
      4. The Partner redirects the customer to an order confirmation page.
    2. Step-up required:
      1. Klarna returns a response indicating that a Step-up flow is needed, including either:
        1. a Klarna redirect URL for the Klarna Purchase Journey, and/or
        2. a Payment Request ID to be used with the Klarna SDK.
      2. The Acquiring Partner forwards this information to the Partner as part of the payment initiation response.
      3. The Acquiring Partner monitors the status of the Klarna payment asynchronously using Webhooks.
      4. Upon successful completion of the Klarna purchase journey, the Acquiring Partner calls the Payment Authorize API a second time to finalize the transaction.
    3. Transaction declined
      1. Klarna returns a declined decision from the Payment Authorize API.
      2. The Acquiring Partner marks the Payment Transaction as declined and returns this result to the Partner.
      3. The Partner sends the customer back to the checkout and shows an appropriate error message, allowing them to select another payment method or retry.
sequenceDiagram autonumber participant C as Customer participant P as Partner participant AP as Acquiring Partner participant K as Klarna C->>P: Visit checkout page alt Partner integrates Klarna SDK directly P->>K: Request Klarna payment presentation Note over P,K: Share Klarna Network data points else Partner uses Acquiring Partner APIs P->>AP: Request available payment methods Note over P,AP: Share Klarna Network data points AP->>K: Request Klarna payment presentation Note over AP,K: Share Klarna Network data points end P->>P: Display payment selector C->>P: Select Klarna and click Pay button P->>AP: Create payment session Note over P,AP: Share Klarna Network data points AP->>K: Authorize payment (initial) Note over AP,K: Share Klarna Network data points alt Step-up required K->>AP: Return payment request for step-up Note over K,AP: Klarna payment URL and request ID AP->>P: Return payment session Note over P,AP: Forward Klarna payment URL and request ID P->>P: Launch Klarna purchase journey C->>K: Complete purchase on Klarna K->>AP: Webhook notification Note over K,AP: Payment request completed AP->>K: Authorize payment (final) K->>AP: Payment APPROVED AP->>P: Webhook notification Note over P,AP: Order completed AP->>C: Redirect to confirmation page else Transaction approved K->>AP: Payment APPROVED AP->>P: Respond with approval Note over P,AP: Order completed P->>C: Redirect to confirmation page else Transaction declined K->>AP: Payment DECLINED AP->>P: Respond with decline Note over P,AP: Payment declined P->>C: Redirect to checkout page Note over C,P: Display error message to customer end
  1. Partner builds the payment form
  2. Initiation of the payment with Klarna: Authorize the payment
  3. Handle step-up scenario
  4. Monitor the payment request
  5. Final authorization (if step-up flow)