One-click payments with Klarna Presentation API (Solidgate orchestrated)
Charge a returning customer's saved Klarna option in a one-click, customer-initiated transaction using the Klarna Presentation API (no SDK), where Solidgate orchestrates the charge. Restore the saved option from the Klarna Customer Token, present Saved and Pick plan, and charge through Solidgate.
This guide explains how to charge a returning customer's saved Klarna option in a one-click, customer-initiated transaction using the Klarna Presentation API (no Web SDK), where you present Klarna server-side and Solidgate orchestrates the charge. The customer is at checkout and has a stored Klarna Customer Token, so Klarna can be pre-selected as a one-click "Saved" option.
Because the Presentation API is server-side, you submit the Klarna Customer Token directly to restore the saved option — no session token is generated for presentation. You then charge through Solidgate: because Solidgate initiates the charge, the charge is authorized on the Solidgate token — Solidgate's own token identifier, which it maps server-side to the Klarna Customer Token it holds. You still present the saved option with the Klarna Customer Token, but the Solidgate token carries the charge. Klarna may still require a step-up based on risk; when it does, Solidgate returns a step-up URL and the customer completes a short Klarna Purchase Journey by redirect before the charge is authorized.
Before you integrate, check that you meet the following prerequisites:
1.
Ensure that you have Klarna enabled with Solidgate.
2.
A stored Solidgate token for the customer — Solidgate's own token identifier that authorizes the charge — and a Klarna Customer Token issued with the payment:customer_present scope to present the saved option (see Create a Klarna Customer Token).
3.
Confirm you have access to the Klarna Partner Portal with an API key able to call the Klarna Payment Presentation API.
Call the Klarna Payment Presentation API server-side with the stored Klarna Customer Token in the Klarna-Customer-Token header — Klarna returns the customer's saved option with a PRESELECT_KLARNA instruction and a payment_option_id.
2.
Render Saved (pre-selected) and Pick plan in your payment selector.
3.
The customer selects the saved option.
4.
Charge through Solidgate, passing the Solidgate token and the payment_option_id in klarna_network_data.
5.
Solidgate resolves the Solidgate token to the Klarna Customer Token and authorizes the charge with Klarna, returning APPROVED, DECLINED, or STEP_UP_REQUIRED.
6.
If a step-up is required, redirect the customer to the step-up URL Solidgate returns to complete the Klarna Purchase Journey; Solidgate then finalizes and returns APPROVED or DECLINED.
sequenceDiagram
autonumber
participant C as Customer
participant P as Partner
participant K as Klarna
participant AP as Solidgate
C->>P: Visits checkout page
P->>K: Call Presentation API<br/>GET payment/presentation
Note over P,K: Header: Klarna-Customer-Token
K-->>P: Return payment methods and instruction
Note over K,P: payment_option_id
P->>P: Display Klarna payment methods
C->>P: Click Klarna payment button
P->>AP: Create payment
Note over P,AP: Solidgate token<br/>klarna_network_data: payment_option_id
alt If customer authentication is required
AP-->>P: Return payment_request_url
P->>C: Redirect to payment_request_url
C->>K: Complete Klarna purchase journey
end
AP-->>P: Order completed notification
P-->>C: Display confirmation message
Unlike the Web SDK variant, a Presentation API one-click charge does not carry a klarna_network_session_token — you submit the Solidgate token and the paymentOptionId (in klarna_network_data) to Solidgate, and Solidgate authorizes directly.
Call the Klarna Payment Presentation API (GET payment/presentation) from your server with the stored Klarna Customer Token in the Klarna-Customer-Token header. No exchange to a Klarna Network Session Token is needed for this server-side flow.
With a Klarna Customer Token context present, the response includes a saved_payment_option (in addition to the default payment_option) and the PRESELECT_KLARNA instruction. Render the Saved option before the default option and pre-select it; the default option becomes the Pick plan entry. Forward the saved option's payment_option_id to the charge.
The recommended presentation when a Klarna Customer Token is available:
Saved Klarna option (pre-selected)
Pick Plan selected
The Klarna Customer Token is required to present the saved option. Render the assets and localized texts returned by the Payment Presentation API verbatim — prioritize saved_payment_option over payment_option whenever both are present.
Chain a session token from Boost features. If you already hold a Klarna Network Session Token obtained when the customer interacted with a Boost feature (for example On-site messaging or Sign in with Klarna) earlier in the checkout, chain it: call the Payment Presentation API with both that session token in the Klarna-Network-Session-Token header and the Klarna Customer Token in the Klarna-Customer-Token header. This links the new personalized session to the existing one, preserving session continuity across the checkout.
When the customer selects the saved option, charge Solidgate directly to finalize the payment.
Field
Presence
Description
Charge credential
required
The Solidgate token — Solidgate's own token identifier. Because Solidgate initiates the charge, the charge is authorized on the Solidgate token; Solidgate resolves it server-side to the klarna_network_customer_token.
klarna_network_data
required
Array carrying the selected payment_option_id — "[paymentOptionId, ...]". Mandatory to charge the saved one-click option.
Solidgate resolves the Solidgate token to the klarna_network_customer_token and authorizes the charge with Klarna behind the scenes. Refer to Solidgate's API reference for the exact field names and response contract.
Display the confirmation page and record the successful charge.
DECLINED
Klarna did not authorize the charge.
Surface a retry/alternative payment to the customer.
STEP_UP_REQUIRED
Klarna needs the customer to complete a short Klarna Purchase Journey before authorizing.
Redirect the customer to the step-up URL Solidgate returns. Once the customer completes the Klarna Purchase Journey, Solidgate finalizes the charge and returns APPROVED or DECLINED.
A saved-option one-click charge often resolves directly to APPROVED or DECLINED, but Klarna may require a step-up based on risk — handle the step-up outcome above so the customer can complete the Klarna Purchase Journey by redirect. If you instead present Klarna as a one-time payment (no Klarna Customer Token), follow Build checkout form with Klarna Presentation API (Solidgate orchestrated).