Solidgate

One-click payments with Klarna Presentation API (Partner orchestrated)

Charge a returning customer's saved Klarna option in a one-click, customer-initiated transaction using the Klarna Presentation API (no SDK), where you orchestrate the charge. Create the Klarna payment request with the Klarna Customer Token, then finalize through Solidgate with the klarna_network_session_token.
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 orchestrate 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 — there is no token exchange. You then create Klarna's payment request yourself with the Klarna Customer Token and the selected payment_option_id. Klarna returns a klarna_network_session_token via the completion webhook, which you forward to Solidgate to finalize the charge.
Charge credential: Klarna Customer Token only. Because you initiate the charge, this flow is authorized on the Klarna Customer Token only. The Solidgate token applies only when Solidgate initiates the charge — see One-click payments with Klarna Presentation API (Solidgate orchestrated).
For the full Presentation API setup (rendering Klarna server-side from the returned assets, payment-request lifecycle), follow Build checkout form with Klarna Presentation API. 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 Klarna Customer Token for the customer, issued with the payment:customer_present scope (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 and the Klarna Payment Request API.
  4. 4.
    Confirm that you have registered webhooks for payment.request.state-change.completed events following the Webhooks guidelines.
  5. 5.
    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 and its payment_option_id.
  2. 2.
    Render Saved (pre-selected) and Pick plan in your payment selector.
  3. 3.
    The customer selects the saved option; you call Klarna's Create Payment Request with the Klarna Customer Token, the payment_option_id, and a customer_interaction_config.
  4. 4.
    If Klarna requires a step-up (based on risk), redirect the customer to the returned payment_request_url to complete the Klarna Purchase Journey. Otherwise the request completes immediately.
  5. 5.
    Klarna fires the payment.request.state-change.completed webhook with a (new) Klarna Network Session Token.
  6. 6.
    You forward the (new) Klarna Network Session Token to Solidgate to finalize the charge.
  7. 7.
    Solidgate approves the order; you redirect the customer to your confirmation page.
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->>K: Create payment request<br/>POST /v2/payment/requests Note over P,K: Header: Klarna-Customer-Token<br/>payment_option_id alt STEP_UP_REQUIRED K-->>P: Return payment_request_url P->>C: Redirect to payment_request_url C->>K: Complete Klarna purchase journey end K-->>P: Payment request completed event (webhook) Note over K,P: (new) klarna_network_session_token P->>AP: Confirm payment Note over P,AP: (new) klarna_network_session_token AP-->>P: Order completed notification P-->>C: Display confirmation message

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 payment request.
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.

Create the Klarna payment request with the Klarna Customer Token

When the customer selects the saved option, create the Klarna payment request from your server, passing the Klarna Customer Token, the selected payment_option_id, and a customer_interaction_config. For a payment:customer_present token the charge may complete immediately or require a short step-up, depending on Klarna's risk assessment — include the customer_interaction_config so Klarna can drive the Klarna Purchase Journey when a step-up is needed.
FieldPresenceDescription
klarna_customer_tokenrequiredThe stored Klarna Customer Token. This is the only charge credential for a Partner-orchestrated charge.
payment_option_idrequiredThe saved option's payment_option_id from the presentation — drives the one-click "Saved" experience.
currencyrequiredCurrency in ISO 4217 format.
amountrequiredTotal charge amount in non-negative minor units (e.g. $118.00 = 11800).
customer_interaction_config.return_urlrequiredURL Klarna returns the customer to after a step-up Klarna Purchase Journey. Include it so a step-up can be completed if Klarna requires one.
BASH
1 2 3 4 5 6 7 8 9 10
curl -X POST https://api-global.test.klarna.com/v2/payment/requests \ -H 'Authorization: Basic <API key>' \ -H 'Klarna-Customer-Token: krn:network:eu1:live:customer-token:[...]' \ -H 'Content-Type: application/json' \ -d '{ "currency": "USD", "amount": 11800, "payment_option_id": "S0xBUk5BXzE3NzI3MDY2MTI2ODg=", "payment_request_reference": "one-click-ref-123", "customer_interaction_config": {

Handle a step-up (if required)

Klarna's Create Payment Request response tells you whether a step-up is needed:
  • No step-up — the payment request completes immediately. Continue to retrieve the (new) klarna_network_session_token.
  • Step-up required — Klarna returns state_context.customer_interaction.payment_request_url and the payment request moves to IN_PROGRESS. Because this is a server-side flow (no Web SDK), redirect the customer to the payment_request_url to complete the Klarna Purchase Journey. Once the customer finishes, they return to your return_url and the payment request transitions to COMPLETED.
Either way, the flow converges on the payment.request.state-change.completed webhook below.

Retrieve the (new) klarna_network_session_token

Klarna issues a (new) klarna_network_session_token once the payment request reaches COMPLETED. Retrieve it by subscribing to the payment.request.state-change.completed webhook (required); you may additionally call the Read Payment Request APIAPI for resilience.
The klarna_network_session_token is valid for only 1 hour and must be forwarded to Solidgate within this time frame to finalize the authorization.

Finalize the charge through Solidgate

Forward the (new) klarna_network_session_token to Solidgate to finalize the charge. Solidgate authorizes with Klarna and returns the outcome. The request/response contract is owned by Solidgate; only the Klarna-specific token you must include is shown here.
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": { "klarna_network_session_token": "" } }

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.
Once any required step-up is complete and you forward the (new) klarna_network_session_token, Solidgate returns APPROVED or DECLINED. A saved-option charge often completes without a step-up, but Klarna may still require one based on risk — always handle the step-up branch above. If you instead present Klarna as a one-time payment (no Klarna Customer Token), follow Build checkout form with Klarna Presentation API.
Related articles
One-click payments with Klarna Presentation API (Solidgate orchestrated)
Build checkout form with Klarna Presentation API (Partner orchestrated)
Tokenized payments overview
Create a Klarna Customer Token (Partner orchestrated)
Register Webhooks
API & SDK references
API