When integrating Klarna payments, the final authorization is a critical step when the step-up scenario occurs. This guide walks you through the creation of a transaction using the payment_token provided by Klarna.
After the customer completes their purchase via Klarna, the Payment Request transitions to the COMPLETED state. At this point:
payment_token which must be secured through Klarna Webhookspayment_token to authorize the payment within 60 minutes to finalize the transaction.payment_transaction_id required for future transaction management.Important: If you do not authorize within 60 minutes, the transaction will be invalidated​.
The below diagram shows the customer journey and Acquiring Partner workflow, illustrating:
The acquiring partner must use the payment_token to perform a second call to Klarna's Payment Authorize APIAPI.
/v2/accounts/{partner_account_id}/payment/authorize| Parameter | Required | Description |
|---|---|---|
Copied partner_account_id | Yes | Unique account identifier assigned by Klarna to the onboarded merchant |
The payment_token must be passed in the Klarna-Payment-Token HTTP header​.
curl https://api-global.test.klarna.com/v2/accounts/{partner_account_id}/payment/authorize \
-H 'Authorization: Basic <API key>' \
-H 'Content-Type: application/json' \
-H 'Klarna-Payment-Token: krn:payment:eu1:payment-token:...' \
-d '{
"currency": "USD",
"request_payment_transaction": {
"amount": 11800,
"payment_transaction_reference": "acquiring-partner-transaction-reference-1234"
}Upon successful authorization, the response body includes the payment_transaction_id, which you'll use for payment transaction management actions​.
/v2/accounts/{partner_account_id}/payment/authorize| Parameter | Required | Description |
|---|
{
"payment_transaction_response": {
"result": "APPROVED",
"payment_transaction": {
"payment_transaction_id": "krn:payment:eu1:transaction:6debe89e-98c0-[...]",
"payment_transaction_reference": "acquiring-partner-transaction-reference-1234",
"amount": 11800,
"currency": "USD",
"payment_funding": {...},
"payment_pricing": {...},