Create a Klarna payment session, present the widget, and manage the order lifecycle

domain: klarna · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a session: POST /payments/v1/sessions with 'purchase_country', 'purchase_currency', 'locale', 'order_amount' (minor units), 'order_lines' array (name, quantity, unit_price, total_amount, tax_rate), and your merchant credentials via HTTP Basic auth.
  2. Use the returned 'client_token' to initialize the Klarna Payments JS SDK on the frontend: Klarna.Payments.init({client_token}) and then Klarna.Payments.load() to render the Klarna widget in a container div.
  3. When the customer clicks your 'Buy' button, call Klarna.Payments.authorize() — this handles Klarna's approval flow (BNPL decision, ID check) and returns an 'authorization_token' on success.
  4. Server-side, place the order: POST /payments/v1/authorizations/{authorization_token}/order with the same order_lines and amounts used in the session — amounts must match exactly or Klarna will reject the request.
  5. Capture funds when you ship: POST /ordermanagement/v1/orders/{order_id}/captures with 'captured_amount' and 'order_lines'; partial captures are supported for partial shipments.
  6. Handle post-purchase operations (refunds, cancellations, extending expiry) via the Order Management API at /ordermanagement/v1/orders/{order_id}/.

Known gotchas

Related routes

Create a Klarna Payments session directly via the Klarna API (not Stripe) and render the Klarna widget in a checkout page
klarna.com · 5 steps · unrated
Create and capture a Klarna order via the Klarna Order Management API after receiving an authorization_token from the Klarna Payments widget
klarna.com · 5 steps · unrated
Create a checkout.com Payment Session and render Flow to complete a payment in a mobile or web app
www.checkout.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans