Integration

Klarna integration

Klarna Buy Now Pay Later (BNPL) and payments platform API. Authorize and capture payments, manage post-purchase order lifecycle (capture, refund, cancel, extend authorization), generate reusable customer tokens for recurring charges, and reconcile settlements/payouts. Used by merchants worldwide to offer Pay Now, Pay Later, and Pay in Installments at checkout. The API is region-scoped: declare {api_host} per credential to target Europe (api.klarna.com), North America (api-na.klarna.com), or Oceania (api-oc.klarna.com), with matching playground hosts for testing. Authentication is HTTP Basic Auth using the merchant API username (UID) and password (secret) issued in the Klarna Merchant Portal.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in Klarna.Built from the 24 Klarna tools below, on the connection you add once.

Common Klarna use cases

  • accounting export
  • reconciliation
  • shipment audit
  • customer return
  • address correction
  • ERP reconciliation
  • merchant dashboard
  • post-shipment update
  • subscription billing
  • shipment confirmation

What you can do with Klarna

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Capture, 4 operations

  • create_captureCreate capturePOSTCaptures funds on an authorized Klarna order.
  • get_captureGet captureGETReads a single Klarna capture by id.
  • list_capturesList capturesGETLists all captures recorded against a Klarna order.
  • trigger_send_outTrigger send outPOSTForces Klarna to email the buyer the invoice for a capture immediately.

Authorization, 3 operations

  • cancel_authorizationCancel authorizationDELETECancels a Klarna authorization, releasing the reserved credit.
  • extend_authorizationExtend authorizationPOSTExtends the authorisation expiry on a Klarna order.
  • release_remaining_authorizationRelease remaining authorizationPOSTReleases the unused remainder of a Klarna authorization.

Customer token, 3 operations

  • generate_customer_tokenGenerate customer tokenPOSTGenerates a reusable Klarna customer token for future recurring charges.
  • read_customer_tokenRead customer tokenGETReads the status of a Klarna customer_token.
  • update_customer_token_statusUpdate customer token statusPATCHCancels a Klarna customer_token so it can no longer be charged.

Order, 3 operations

  • cancel_orderCancel orderPOSTCancels an authorized but not-yet-captured Klarna order.
  • create_orderCreate orderPOSTCreates a Klarna order from an authorization_token.
  • get_orderGet orderGETReads the full state of a Klarna order.

Session, 3 operations

  • create_sessionCreate sessionPOSTCreates a Klarna Payments session and returns a client_token for the SDK.
  • read_sessionRead sessionGETReads the current state of a Klarna Payments session.
  • update_sessionUpdate sessionPOSTUpdates an existing Klarna Payments session with the latest cart state.

Payout, 2 operations

  • get_payoutGet payoutGETReads a Klarna payout summary by reference.
  • list_payoutsList payoutsGETLists Klarna payouts to the merchant within a date range.

Customer details, 1 operation

  • update_customer_detailsUpdate customer detailsPATCHUpdates billing/shipping address on a Klarna order.

Merchant references, 1 operation

  • update_merchant_referencesUpdate merchant referencesPATCHUpdates merchant_reference1/2 on a Klarna order.

Recurring order, 1 operation

  • create_order_from_customer_tokenCreate order from customer tokenPOSTCreates a new Klarna order from a stored customer_token (no re-auth needed).

Refund, 1 operation

  • create_refundCreate refundPOSTRefunds part or all of a captured Klarna order.

Shipping info, 1 operation

  • add_shipping_info_to_captureAdd shipping info to capturePOSTAttaches tracking information to a Klarna capture.

Transaction, 1 operation

  • list_payout_transactionsList payout transactionsGETLists individual transactions inside a Klarna payout.

Use Klarna from Claude Code, Cursor or Codex

Connect Klarna in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Klarna operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect Klarna

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect Klarna once

    Add your Klarna connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

Klarna integration FAQ

What can you do with the Klarna integration?

LiveContext exposes 24 operations on Klarna, covering capture, authorization, customer token and order. Common uses include accounting export, reconciliation and shipment audit.

Popular integrations

Browse the whole catalog