Integrate Klarna's Payment Authorize API for server-side, partner-initiated scenarios. This guide shows how to authorize payment transactions without customer interaction, using stored customer tokens for recurring or scheduled payments.
Authorize a Payment Transaction with Klarna using a server-side integration when the customer is not present. As an Acquiring Partner, you'll collect payment context from the Partner, call authorizePayment with a stored customer token, handle authorization outcomes, and return results — all without requiring customer interaction. This flow is ideal for subscription renewals, scheduled payments, and other Partner-initiated transactions.
Before starting, ensure the following:
Once the Partner initiates Payment Authorization (for example, a subscription renewal):
APPROVEDDECLINEDPartners can initiate token charges in two ways:
| Parameter | Required (Acquiring Partner) | Required (Partner) | Description |
|---|---|---|---|
amount | Yes | Yes | Total amount of the authorization, including tax and any available discounts. |
currency | Yes | Yes | Currency in ISO 4217 format. |
| Acquiring Partner's internal customer token identifier | Yes | Yes | The customer token identifier provided to the Partner by the Acquiring Partner during tokenization. The Acquiring Partner uses this identifier to look up the corresponding Klarna Customer Token. |
supplementary_purchase_data | Yes | Recommended | Additional details about the transaction to help reduce fraud risk and enhance transparency. Include this data to improve underwriting, fraud detection, and customer communication. Klarna processes and uses this data for fraud assessment and customer experience optimization. |
supplementary_purchase_data.purchase_reference | Yes | Recommended | Customer-facing payment reference displayed to customers on the Klarna app and other communications. Also included in settlement reports for reconciliation purposes. If you are an Acquiring Partner, this is the reference your Partner generated for their customer payment. |
supplementary_purchase_data.line_items | Yes | Recommended | Detailed line item information of the purchase. Sending complete line item data is highly recommended as it improves authorization approval rates and customer experience. |
supplementary_purchase_data.customer | Yes | Recommended | Information about the customer based on their previous interactions with the Partner. These data points may be used by Klarna to simplify sign-up and during fraud assessment, as well as for underwriting purposes to provide an enhanced experience to returning customers. |
supplementary_purchase_data.shipping | Yes | Recommended | Shipping information for the purchase. This data is used for fraud detection and customer communication. If the purchase contains multiple shipments with different recipients, provide one shipping object per shipment. |
supplementary_purchase_data.subscriptions | Yes | Conditional | Subscription details including subscription reference, billing plans, and free trial status. Mandatory when charging specific subscriptions. |
klarna_network_session_token | Yes | Conditional | Encodes Klarna Network session context (prequalification, sign-in state, or approval). Optional for partner-initiated flows as authorization typically relies on stored customer tokens via customer_reference. |
klarna_network_data | Yes | Recommended | Additional data to enable custom features or data exchange supported by your Integrating Partner. Klarna accepts this passthrough field in a structured JSON format and forwards it to relevant systems for interoperability. Data shared in this field may complement structured datapoints provided in supplementary_purchase_data. Treat this value as an opaque string; do not validate or infer its structure. |
Requirements
klarna_network_session_token and klarna_network_data in the Partner-facing API to ensure Partners can easily identify and use them.supplementary_purchase_data when calling KlarnaMap your existing Partner-facing fields into supplementary_purchase_data when calling Klarna:
Line items: items supplementary_purchase_data.line_items
Customer info: billing supplementary_purchase_data.customer
Shipping: shipping supplementary_purchase_data.shipping
Purchase reference: order_id supplementary_purchase_data.purchase_reference
Add new Partner-facing fields "just for Klarna" if you already have equivalents:
Don't introduce parallel structures like items and klarna_line_items
Don't force Partners to submit the same data twice
The two structures will diverge over time, causing maintenance issues
Supplementary purchase data scenarios
Acquiring Partners may receive supplementary purchase data (including line items, L2/L3 data for Card Network optimization, and transaction context) in one or both of the following ways:
klarna_network_data: Forward as received without parsing or mappingsupplementary_purchase_data object when calling authorizePaymentThe authorizePayment API is used to start the payment process on Klarna whether they are with or without customer presence.
In the request to authorizePayment, specify the following parameters:
curl https://api-global.test.klarna.com/v2/accounts/{partner_account_id}/payment/authorize \
-H 'Authorization: Basic <API key>' \
-H 'Klarna-Customer-Token: <token>' \
-H 'Klarna-Network-Session-Token: <token>' \
-H 'Content-Type: application/json' \
-d '{
"currency": "USD",
"request_payment_transaction": {
"amount": 11800,
"payment_option_id": "***",
"payment_transaction_reference": "finalize-ref-1234"
},When performing Partner-initiated authorization through authorizePayment, Klarna returns a response that reflects the result of the authorization. Since this flow includes a
request_payment_transaction in the request and the customer is not present, the response will always contain a payment_transaction_response object with a result field that indicates the outcome.
For partner-initiated flows without customer interaction, the result has the following possible values:
| Result | Description | Next steps |
|---|---|---|
APPROVED | The authorization succeeded and a payment_transaction was created. | Store the payment_transaction_id, return success to Partner, and proceed with post-purchase operations (capture or refund) as needed. |
DECLINED | The authorization failed (for example, due to fraud, credit, or risk policy) and no transaction was created. | Return failure response to Partner and end the authorization flow. |
Partner-initiated payments do not support the STEP_UP_REQUIRED result since the customer is not present to complete additional verification.
The response schema is as follows:
Sample payload
{
"payment_transaction_response": {
"result": "APPROVED",
"payment_transaction": {
"payment_transaction_id": "krn:payment:eu1:transaction:6debe89e-98c0-[...]",
"payment_transaction_reference": "transaction-reference-1234",
"amount": 11800,
"currency": "USD",
"payment_funding": {
"type": "INVOICE",
"details": { "..." : "..." }
},Map the Klarna authorization result to the Partner-facing API response.
When available, also return:
klarna_network_response_dataRequirements
After implementing partner-initiated payment authorization, explore these related topics: