Create a Klarna payment session
Creates a Klarna payment session for the cart and returns the session_id
and client_token used to render the Klarna widget client-side. The
session intent is derived server-side from the cart’s contents (buy, or
buy_and_tokenize when the cart contains a subscription); the optional
intent field is accepted for compatibility but ignored. Cart-token
authenticated. Returns 400 when Klarna rejects the session, 404 when
the cart is not found, 410 when the cart has already been processed or
holds an authorized enrollment, and 422 when the request body fails
validation.
Path Parameters
Opaque cart token returned by the create-cart response. It scopes the request to a single cart and is the credential for these endpoints — cart-token authentication carried in the path, with no bearer token or API key.
Body
Accepted for compatibility but ignored — the session intent is derived from the cart's contents.
Response
Session created
Success body for Klarna session creation.
true when the Klarna session was created.
Klarna session id, reused on the update endpoint; null when Klarna returned no session.
Klarna client token used to render the Klarna payment widget in the browser; null when Klarna returned none.
Standard response metadata included on every response.