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.
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.
The customer navigates to the Partner’s checkout page.
The customer navigates to the Partner’s checkout page.
The Partner’s backend prepares the order data and retrieves available payment methods, either:
directly from Klarna’s payment presentation services (if allowed by the integration), or
from the Acquiring Partner’s API, which returns configured payment methods including Klarna and their descriptors.
The Partner’s checkout uses this information to present Klarna in line with Klarna’s presentation guidelines.
The Partner displays a payment selector to the customer, with Klarna listed as a payment method.
The Partner shows a payment method selector that includes Klarna.
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).
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.
The Partner’s request to the Acquiring Partner must include:
identification of the Partner and the transaction,
all required Klarna Network Data attributes, and
information needed to construct the Klarna Payment Request.
The Partner initiates a payment session with the Acquiring Partner. Upon receiving the request:
The Acquiring Partner validates the Partner’s data, including Klarna Network Data.
The Acquiring Partner creates a Payment Request towards Klarna by calling the Payment Authorize API.
Klarna evaluates the request and either:
approves the transaction immediately, or
determines that a Step-Up flow is required.
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:
Redirect mode: Returns a Klarna payment URL for the Partner to redirect the customer.
SDK mode: Returns a Klarna Payment Request ID for the Partner to initiate the purchase flow using Klarna’s SDK.
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:
Happy path:
Klarna returns an approved decision from the Payment Authorize API.
The Acquiring Partner updates its Payment Transaction state to approved.
The Acquiring Partner notifies the Partner (via synchronous response or webhook) that the order is confirmed.
The Partner redirects the customer to an order confirmation page.
Step-up required:
Klarna returns a response indicating that a Step-up flow is needed, including either:
a Klarna redirect URL for the Klarna Purchase Journey, and/or
a Payment Request ID to be used with the Klarna SDK.
The Acquiring Partner forwards this information to the Partner as part of the payment initiation response.
The Acquiring Partner monitors the status of the Klarna payment asynchronously using Webhooks.
Upon successful completion of the Klarna purchase journey, the Acquiring Partner calls the Payment Authorize API a second time to finalize the transaction.
Transaction declined
Klarna returns a declined decision from the Payment Authorize API.
The Acquiring Partner marks the Payment Transaction as declined and returns this result to the Partner.
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