Learn how to create and manage Payment Requests with Klarna: the standard first step for Partners to start a payment, drive the Klarna Purchase Journey, and obtain the token needed to authorize the transaction.
Creating a Payment Request is the standard first step for Partners to initiate a payment with Klarna. The Payment Request represents a pending purchase that the customer reviews and approves through Klarna Purchase Journey. Once approved, Klarna issues a Klarna Network Session Token used to authorize the payment and create the resulting Payment Transaction.
sequenceDiagram
autonumber
participant C as Customer
participant P as Partner
participant K as Klarna
C->>P: Proceed to checkout
P->>K: Create Payment Request
K->>P: payment_request_id, payment_request_url, state=SUBMITTED
P->>C: Redirect to payment_request_url
C->>K: Complete Purchase Journey
K->>P: Webhook payment.request.state-change.completed
Note over K,P: klarna_network_session_token
P->>K: authorizePayment (with klarna_network_session_token)
K->>P: Payment Transaction created
Partners call createPaymentRequest from their backend. Klarna validates the request, generates a unique payment_request_id, and returns the Payment Request along with the URL the customer should be sent to.
This approach gives Partners full control over the payment flow and is independent of any client-side SDK. Use it whenever the checkout can call Klarna server-side.
Include supplementary_purchase_data. The following sub-fields are contractually required: line_items, purchase_reference, customer, and shipping. See Supplementary purchase data for the full set of fields.
When integrating with the Klarna Web SDK, the SDK can submit a Payment Request from the browser on behalf of Partners. This is convenient when Partners have no backend that can call Klarna directly, or when the entire checkout flow stays in the client.
Using the Web SDK to create the Payment Request still results in the same resource, the same lifecycle, and the same klarna_network_session_token once the customer completes the Klarna Purchase Journey.
For checkout integrations, Option 1 is preferred whenever possible: it offers stronger control, easier debugging, and clearer ownership of the request lifecycle.
When the Partner's Klarna setup includes more than one Payment Account (for example, multiple legal entities, brands, or store IDs), the acquiring_config block tells Klarna which one this Payment Request belongs to. When omitted, Klarna uses the default account configured for the Partner.
Provide one of the following routing variants:
Variant
Fields
When to use
Account-only
payment_account_id
A single Payment Account is operated per legal entity, and Klarna picks the matching Payment Acquiring Account automatically.
The same acquiring_config block, extended with settlement_currency, is also available on authorizePayment when Klarna should settle the resulting Payment Transaction in a specific currency. See Request settlement currency.
The Klarna Purchase Journey is Klarna's customer-facing flow where customers review and approve the payment. Partners launch it by sending the customer to the payment_request_url returned in the Payment Request.
The launch method is set on customer_interaction_config.method at Payment Request creation time. Choose the one that matches the customer experience:
HANDOVER (default): Redirect the customer to the payment_request_url returned in the Payment Request. Works for both web and mobile (native apps can open the URL via a universal link). On mobile, configure app_return_url so the customer is brought back to the Partner's app when the journey hands off to a third-party app (for example, a bank app or the Klarna app).
QR_CODE: Display the QR code returned in state_context.customer_interaction so the customer can continue the journey on a different device. Useful for in-store, contact center, or smart-TV checkouts.
Payment Requests progress through several states during their lifecycle. By default, a Payment Request remains open for 3 hours before expiring. This default can be overridden with the custom Payment Request expiry feature.
Initial state. Payment Request has been created and is waiting for the customer to enter the Klarna Purchase Journey.
IN_PROGRESS
The customer is in Klarna Purchase Journey reviewing and approving the payment authorization.
COMPLETED
The customer has completed the Klarna Purchase Journey and approved the payment authorization. A Klarna Network Session Token is issued to authorize the final transaction.
EXPIRED
Payment Request expired without completion. The default lifetime is 3 hours, configurable via interaction_expiry.
CANCELED
Payment Request was canceled by the Partner before authorization.
DECLINED
Payment Request was declined during the authorization process (for example, no payment methods available for the customer).
Partners must monitor Payment Request state changes to know when the customer has completed the Klarna Purchase Journey and to retrieve the Klarna Network Session Token needed to authorize the payment.
Klarna webhooks (required): Subscribe to payment.request.state-change.completed webhooks to receive notifications when the state changes to COMPLETED.
readPaymentRequest: Retrieve the current Payment Request state and the klarna_network_session_token from the state_context when state is COMPLETED.
Klarna recommends proactively canceling Payment Requests that have not resulted in successful transactions, especially when the checkout session timeout is shorter than Klarna's default of 3 hours. Use cancelPaymentRequest to cancel them explicitly.
Once the Payment Request reaches COMPLETED and the klarna_network_session_token has been retrieved, call authorizePayment with the token and the final purchase details. The call returns APPROVED, STEP_UP_REQUIRED, or DECLINED.
Boost-issued Klarna Network Session Tokens bypass the upfront Payment Request. Because a valid klarna_network_session_token is already available, createPaymentRequest is skipped entirely and authorizePayment is called directly. Klarna creates the Payment Request server-side as part of the authorize call. This is the same authorizePayment-first pattern used for Customer Token authorizations.
Retrieve the token from the SDK when the customer completes the Boost interaction (for example, after Express checkout returns control to the Partner's page).
The Klarna-Network-Session-Token header set to the SDK-issued token.
2.2.
currency and request_payment_transaction (amount, reference, optional capture: "NOW").
2.3.
supplementary_purchase_data for the final cart contents.
2.4.
Required:step_up_config with customer_interaction_config.method = HANDOVER and a return_url. Boost interactions do not include the full Klarna Purchase Journey, so Klarna typically requires additional customer interaction before approving the authorization. Without step_up_config, Klarna returns DECLINED rather than STEP_UP_REQUIRED, removing the opportunity to recover via a Klarna Purchase Journey.
2.5.
Optionally acquiring_config to route to a specific Payment Account or request a settlement_currency.
3.
Handle the result. The same three outcomes apply as for any other authorize call (APPROVED, STEP_UP_REQUIRED, DECLINED). For parameter details, sample payloads, and full result handling, including the step-up recovery pattern, see Authorize a customer-initiated payment (server-side).