Final authorization

Explore final authorization for Hosted Checkout pages and embedded elements, ensuring seamless integration across all methods. This guide provides detailed instructions and emphasizes the standardized process for developers integrating Klarna's solutions.

{{#lst:Final authorization|Integration overview}}

Final authorization functions the same across all integration methods. If it has already been implemented—for example, with a server-only integration for one-time payments—it can be reused without modification.

Integration details

Call Payment Authorize API with klarna_network_session_token

The acquiring partner must use the klarna_network_session_token to perform a second call to Klarna's Payment Authorize APIKlarna Icon.

Request parameters

Payment AuthorizeKlarna Icon
POST:/v2/accounts/{partner_account_id}/payment/authorize
Show recommended
ParameterRequiredDescription
partner_account_id
Yes

Unique account identifier assigned by Klarna to the onboarded merchant

Here you can find all required parameters for this operation authorizePaymentKlarna Icon

Sample Request

The klarna_network_session_token must be passed in the Klarna-Network-Session-Token HTTP header​.

SHELL
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-Network-Session-Token: krn:payment:eu1:klarna-network-session-token:...' \
-d '{
      "currency": "USD",
      "request_payment_transaction": {
        "amount": 11800,
        "payment_transaction_reference": "acquiring-partner-transaction-reference-1234"
      }
    }'

Handling Klarna's response

Upon successful authorization, the response body includes the payment_transaction_id, which you'll use for payment transaction management actions​.

  • The endpoint is idempotent, so repeated requests with the same token return the same result, ensuring safe retries​.

Response parameters

Payment AuthorizeKlarna Icon
POST:/v2/accounts/{partner_account_id}/payment/authorize
Show recommended
ParameterRequiredDescription
Here you can find all required parameters for this operation authorizePaymentKlarna Icon

Sample response

JSON
{
  "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": {...},
      "expires_at": "2025-10-30T19:26:02.772Z"
    }