Klarna MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Klarna MCP or direct API to create payment sessions, manage orders, retrieve settlements, and handle customer tokens through natural language.

Klarna logoKlarna
Api Key

Klarna is a merchant payments platform for checkout, payments, orders, and settlements. It helps businesses offer flexible payment options with streamlined payment operations.

58 Tools

Try Klarna now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Klarna
Try asking
TOOLS

Supported Tools

Every Klarna action and event your agent gets out of the box.

Abort Checkout Order

Irreversibly abort an incomplete legacy Klarna Checkout order.

Accept Dispute Loss

Irreversibly request acceptance of the financial loss for a Klarna dispute.

Acknowledge Order

Acknowledge receipt of a Klarna order so order processing can continue.

Add Capture Shipping Info

Append shipping carrier and tracking information to a Klarna capture.

Add Order Shipping Info

Append shipping carrier and tracking information to a Klarna order.

Cancel Authorization

Irreversibly cancel a Klarna payment authorization before an order is created from it.

Cancel Order

Irreversibly cancel an uncaptured Klarna order that is not closed.

Capture Order

Irreversibly capture all or part of an authorized Klarna order and return the created capture ID.

Create Card Promise

Create a Klarna card promise for an order.

Create Card Settlement

Create a Klarna settlement for a completed order and issue its encrypted virtual cards.

Create Checkout Order

Create a legacy Klarna Checkout V3 order and return its checkout details.

Create Customer Token From Authorization

Create a reusable Klarna customer token from a payment authorization token for subscription purchases.

Create HPP Session

Create a Hosted Payment Page session from an existing Klarna Payments session or Checkout order URL.

Create Order From Authorization

Create a Klarna order from a customer authorization token.

Create Order From Customer Token

Create a Klarna order using a reusable customer token.

Create Payment Session

Create a Klarna Payments session and return its session ID, sensitive client token, and available payment method categories.

Disable HPP Session

Irreversibly disable a Klarna Hosted Payment Page session that has not completed.

Distribute HPP Session

Distribute a Klarna Hosted Payment Page link by email, SMS, or a documented token access ID.

Download Dispute Attachment

Download a merchant or customer evidence attachment from a Klarna payment dispute as a bounded file reference.

Download Payout PDF

Download the PDF settlement report for one payout.

Download Payouts Summary PDF

Download a PDF payout summary for a payout date-time range.

Download Payouts Summary Transactions CSV

Download a CSV summary of Klarna payouts and transactions for an inclusive payout date-time range.

Download Payout Transactions CSV

Download a CSV report containing one payout and its transactions.

Enroll Dispute Merchant

Irreversibly activate Disputes v3 handling for one direct Klarna merchant account.

Enroll Dispute Partner

Irreversibly activate Disputes v3 handling for one Klarna partner account.

Extend Capture Due Date

First call KLARNA_LIST_CAPTURE_DUE_DATE_OPTIONS for this order and capture, then extend the payment due date using one returned option.

Extend Order Authorization Time

Extend the authorization validity period for an order that is still AUTHORIZED and delayed unexpectedly.

Get Capture

Return one Klarna capture by order ID and capture ID.

Get Card Promise

Retrieve a Klarna card promise and its card specifications.

Get Card Settlement

Retrieve a Klarna card settlement by settlement ID or by its associated order ID.

Get Checkout Order

Return a legacy Klarna Checkout order by order ID.

Get Customer Token

Return a reusable Klarna customer token and its current status.

Get Dispute

Return a fully detailed Klarna Disputes v3 record, including associated merchant and customer evidence.

Get HPP Session

Return the current details and distribution state of a Klarna Hosted Payment Page session.

Get Order

Return a Klarna order and its current authorization, capture, refund, shipping, and customer details.

Get Payment Session

Return the current details of a Klarna Payments session by session ID.

Get Payout

Return one Klarna payout by payment reference.

Get Payout Summary

Return Klarna payout totals grouped by currency for an inclusive payout date-time range.

Get Refund

Return one Klarna refund by order ID and refund ID.

Get VCC Order Cancellation

Retrieve the asynchronous cancellation status for a Klarna order with a Virtual Credit Card settlement.

List Capture Due Date Options

List the due-date extension options available for a Klarna capture.

List Disputes

Return one page of Klarna Disputes v3 records using all documented filters.

List Order Captures

Return all captures recorded for a Klarna order.

List Payouts

Return one offset-controlled page of Klarna payouts, optionally filtered by payout date range and currency.

List Settlement Transactions

Return one offset-controlled page of Klarna settlement transactions, optionally filtered by payout reference or order ID.

Refund Order

Irreversibly create a full or partial Klarna refund and return the created refund ID.

Release Remaining Authorization

Irreversibly release the uncaptured authorization remaining on a Klarna order.

Request Customer Token Cancellation

Request asynchronous cancellation of a reusable Klarna customer token by changing its status to CANCELLED.

Request VCC Order Cancellation

Irreversibly request cancellation of a Klarna order associated with a Virtual Credit Card settlement.

Resend Capture Customer Communication

Irreversibly resend Klarna customer communication for a capture.

Respond to Dispute

Submit reason-specific merchant evidence for a Klarna dispute request.

Update Checkout Order

Update a legacy Klarna Checkout order and return the resulting order.

Update Order Authorization

Update the authorized amount and order lines on an existing order.

Update Order Customer Details

Update the permitted customer address details on an existing order.

Update Order Merchant References

Update the merchant reference values stored on a Klarna order.

Update Payment Session

Update mutable data on an existing Klarna Payments session, including order amounts and lines, customer and billing or shipping addresses, merchant references and URLs, purchase locale and currency, payment options, and session intent.

Upload Dispute Attachment

Upload one merchant evidence attachment to a Klarna payment dispute.

Upload Dispute Attachments

Upload 1-10 merchant evidence attachments to one Klarna payment dispute, sequentially in input order.

SETUP GUIDE

Connect Klarna MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["klarna"],
  mcp: true,
});
Create a session scoped to Klarna and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Retrieve the details for Klarna order order_12345",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Klarna request
SETUP GUIDE

Connect Klarna API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["klarna"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Klarna
3

Run Klarna tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Retrieve the details for Klarna order order_12345" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Klarna tool calls through the session, and print the final answer

Why Use Composio?

AI Native Klarna Integration

  • Supports both Klarna MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Klarna data

Managed Auth

  • Secure API key handling without hard-coded credentials in agent code
  • Central place to manage, scope, and revoke Klarna access
  • Per user and per environment credentials for safer deployments

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Klarna
  • Scoped, least privilege access to Klarna resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Yes, Klarna requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Klarna connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Create the key in your Klarna account settings, then paste it once on Composio's connection page. Composio stores it encrypted and uses it only for the Klarna actions your agent runs. Nobody else in your workspace can read it, and you can revoke it inside Klarna at any time.

When you connect a Klarna account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Klarna as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Whatever the credentials you connect allow inside Klarna. If Klarna lets you scope a key to specific permissions, create a scoped one so the agent can only do what you intend. You can revoke the key inside Klarna at any time.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Klarna connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

The connection stops working the moment Klarna rejects the old key. Create a new key in Klarna and reconnect the account from the Composio dashboard or by asking your agent to reconnect Klarna. Nothing else changes.

Composio's free Hobby plan includes 100,000 tool calls per month with no credit card, which covers most personal Klarna use. Paid plans add higher limits and team features. Your Klarna plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Klarna accounts).

With Composio, you connect Klarna once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Klarna.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Klarna tool your agent needs.Free to start.

Start building