Solidgate

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.
For the full Presentation API setup (rendering Klarna server-side from the returned assets, payment selector behavior), follow Build checkout form with Klarna Presentation API (Solidgate orchestrated). This page covers only the saved-option specifics. To compare all tokenized flows, see the Tokenized payments overview.

Prerequisites

Before you integrate, check that you meet the following prerequisites:
  1. 1.
    Ensure that you have Klarna enabled with Solidgate.
  2. 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. 3.
    Confirm you have access to the Klarna Partner Portal with an API key able to call the Klarna Payment Presentation API.
  4. 4.
    Add Terms and Conditions covering saved payment methods.

Integration overview

  1. 1.
    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. 2.
    Render Saved (pre-selected) and Pick plan in your payment selector.
  3. 3.
    The customer selects the saved option.
  4. 4.
    Charge through Solidgate, passing the Solidgate token and the payment_option_id in klarna_network_data.
  5. 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. 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.

Integration details

Restore and present the saved Klarna option

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.
SHELL
1 2 3 4 5 6 7 8 9
curl -G https://api-global.test.klarna.com/v2/accounts/{partner_account_id}/payment/presentation \ -H 'Authorization: Basic <API key>' \ -H 'Content-Type: application/json' \ -H 'Klarna-Customer-Token: krn:network:eu1:live:customer-token:[...]' \ --data-urlencode 'locale=en-US' \ --data-urlencode 'amount=11800' \ --data-urlencode 'currency=USD' \ --data-urlencode 'intent=PAY'
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 option selected
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.

Charge the saved option through Solidgate

When the customer selects the saved option, charge Solidgate directly to finalize the payment.
FieldPresenceDescription
Charge credentialrequiredThe 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_datarequiredArray carrying the selected payment_option_id"[paymentOptionId, ...]". Mandatory to charge the saved one-click option.
BASH
1 2 3 4 5 6 7 8 9 10
curl -X POST https://api.acquiring-partner.com/payment \ -H "Content-Type: application/json" \ -d '{ "amount": 11800, "currency": "USD", "payment_methods": { "klarna": { "<acquiring-partner token>": "", "klarna_network_data": "[paymentOptionId, ...]" }
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.

Handle the outcome

OutcomeWhat it meansNext step
APPROVEDKlarna authorized the charge.Display the confirmation page and record the successful charge.
DECLINEDKlarna did not authorize the charge.Surface a retry/alternative payment to the customer.
STEP_UP_REQUIREDKlarna 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).
Related articles
Build checkout form with Klarna Presentation API (Solidgate orchestrated)
Tokenized payments overview
Create a Klarna Customer Token (Partner orchestrated)
1. General