---
canonical_url: "https://docs.composio.dev/toolkits/klarna"
markdown_url: "https://docs.composio.dev/toolkits/klarna.md"
product: "platform"
version: null
last_updated: null
---

# Klarna

Klarna provides merchant APIs for payments, checkout, order management, settlements, customer tokens, and hosted payment pages.

- **Category:** commerce
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 58
- **Triggers:** 0
- **Slug:** `KLARNA`
- **Version:** 00000000_00

## Tools

### Abort Checkout Order

**Slug:** `KLARNA_ABORT_CHECKOUT_ORDER`

Irreversibly abort an incomplete legacy Klarna Checkout order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna Checkout order ID to abort. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Accept Dispute Loss

**Slug:** `KLARNA_ACCEPT_DISPUTE_LOSS`

Irreversibly request acceptance of the financial loss for a Klarna dispute. HTTP 202 means Klarna accepted the request for processing; use GET_DISPUTE to verify that the dispute closed and the chargeback was activated.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_dispute_id` | string | Yes | Klarna payment dispute ID whose loss will be irreversibly accepted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Acknowledge Order

**Slug:** `KLARNA_ACKNOWLEDGE_ORDER`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID to acknowledge. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add Capture Shipping Info

**Slug:** `KLARNA_ADD_CAPTURE_SHIPPING_INFO`

Append shipping carrier and tracking information to a Klarna capture.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID containing the capture. |
| `capture_id` | string | Yes | Klarna capture ID to update. |
| `shipping_info` | array | Yes | Shipping carrier and tracking records to append to the capture. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add Order Shipping Info

**Slug:** `KLARNA_ADD_ORDER_SHIPPING_INFO`

Append shipping carrier and tracking information to a Klarna order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID to which shipping information will be appended. |
| `shipping_info` | array | Yes | Shipping carrier and tracking records to append to the order. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel Authorization

**Slug:** `KLARNA_CANCEL_AUTHORIZATION`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `authorization_token` | string | Yes | Authorization token returned by the Klarna client-side authorization flow. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel Order

**Slug:** `KLARNA_CANCEL_ORDER`

Irreversibly cancel an uncaptured Klarna order that is not closed. Cancellation cannot be undone.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID to cancel. The order must be uncaptured and not closed; cancellation cannot be undone. |
| `idempotency_key` | string | No | Unique key for this logical cancellation, preferably a UUID v4. Reuse the same key only when retrying that cancellation after a network error or timeout. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Capture Order

**Slug:** `KLARNA_CAPTURE_ORDER`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `capture` | object | Yes | Capture amount, line items, and shipping details. |
| `order_id` | string | Yes | Klarna order ID to capture. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Card Promise

**Slug:** `KLARNA_CREATE_CARD_PROMISE`

Create a Klarna card promise for an order. This Merchant Card Service operation requires Virtual Card Number (VCN) entitlement. Creating a new promise irreversibly invalidates the previous promise for the same order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `cards` | array | Yes | Card specifications to include in the promise. |
| `order_id` | string | Yes | Klarna order ID for which to create the card promise. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Card Settlement

**Slug:** `KLARNA_CREATE_CARD_SETTLEMENT`

Create a Klarna settlement for a completed order and issue its encrypted virtual cards. This Merchant Card Service operation requires Virtual Card Number (VCN) entitlement and commits a new settlement, an irreversible effect.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Completed Klarna order ID to settle. |
| `promise_id` | string | No | Card promise identifier associated with the settlement. |
| `card_data_encryption_key_id` | string | Yes | Public-key identifier Klarna must use to encrypt the card data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Checkout Order

**Slug:** `KLARNA_CREATE_CHECKOUT_ORDER`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `checkout_order` | object | Yes | Complete structured Klarna Checkout V3 order request. |
| `klarna_partner` | string | No | Optional Klarna partner identifier. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Customer Token From Authorization

**Slug:** `KLARNA_CREATE_CUSTOMER_TOKEN_FROM_AUTHORIZATION`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `token_request` | object | Yes | Customer token creation details required by Klarna. |
| `authorization_token` | string | Yes | Authorization token returned by the Klarna client-side authorization flow. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create HPP Session

**Slug:** `KLARNA_CREATE_HPP_SESSION`

Create a Hosted Payment Page session from an existing Klarna Payments session or Checkout order URL. The returned distribution-module token is sensitive and must not be logged or persisted.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `hpp_session` | object | Yes | Complete Hosted Payment Page session creation body. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Order From Authorization

**Slug:** `KLARNA_CREATE_ORDER_FROM_AUTHORIZATION`

Create a Klarna order from a customer authorization token. When order.auto_capture is true, Klarna also captures payment automatically.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order` | object | Yes | Structured order request matching Klarna's create-order schema. |
| `authorization_token` | string | Yes | Authorization token returned by the Klarna client-side authorization flow. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Order From Customer Token

**Slug:** `KLARNA_CREATE_ORDER_FROM_CUSTOMER_TOKEN`

Create a Klarna order using a reusable customer token. Setting auto_capture to true captures the payment automatically.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order` | object | Yes | Structured customer-token order request with all documented fields. |
| `customer_token` | string | Yes | Reusable Klarna customer token. |
| `idempotency_key` | string | No | Fresh UUID v4 for this logical operation. Reuse the same value only when retrying that identical operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Payment Session

**Slug:** `KLARNA_CREATE_PAYMENT_SESSION`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_session` | object | Yes | The complete Klarna payment session request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Disable HPP Session

**Slug:** `KLARNA_DISABLE_HPP_SESSION`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `session_id` | string | Yes | ID of the Klarna Hosted Payment Page session to disable. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Distribute HPP Session

**Slug:** `KLARNA_DISTRIBUTE_HPP_SESSION`

Distribute a Klarna Hosted Payment Page link by email, SMS, or a documented token access ID. Warning: choosing email or SMS immediately sends a message to the specified external recipient; confirm the destination before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `session_id` | string | Yes | ID of the Klarna Hosted Payment Page session whose link will be distributed. |
| `distribution` | string | Yes | Distribution parameters. The email and SMS variants immediately send the HPP link to the specified external recipient. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Dispute Attachment

**Slug:** `KLARNA_DOWNLOAD_DISPUTE_ATTACHMENT`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_dispute_id` | string | Yes | ID of the Klarna payment dispute that owns the attachment. |
| `payment_dispute_attachment_id` | string | Yes | ID of the merchant or customer evidence attachment to download. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Payout PDF

**Slug:** `KLARNA_DOWNLOAD_PAYOUT_PDF`

Download the PDF settlement report for one payout.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_reference` | string | Yes | Reference ID of the payout. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Payouts Summary PDF

**Slug:** `KLARNA_DOWNLOAD_PAYOUTS_SUMMARY_PDF`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end_date` | string | Yes | Inclusive payout-range end as an ISO 8601 date or date-time. A date alone starts at 00:00:00; use 23:59:59 for the full final day. |
| `start_date` | string | Yes | Inclusive payout-range start as an ISO 8601 date or date-time. A date alone starts at 00:00:00; use a full timestamp to avoid ambiguity. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Payouts Summary Transactions CSV

**Slug:** `KLARNA_DOWNLOAD_PAYOUTS_SUMMARY_TRANSACTIONS_CSV`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end_date` | string | Yes | Inclusive payout-range end as an ISO 8601 date or date-time. A date alone starts at 00:00:00; use 23:59:59 for the full final day. |
| `start_date` | string | Yes | Inclusive payout-range start as an ISO 8601 date or date-time. A date alone starts at 00:00:00; use a full timestamp to avoid ambiguity. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Download Payout Transactions CSV

**Slug:** `KLARNA_DOWNLOAD_PAYOUT_TRANSACTIONS_CSV`

Download a CSV report containing one payout and its transactions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_reference` | string | Yes | Reference ID of the payout to include in the CSV report. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Enroll Dispute Merchant

**Slug:** `KLARNA_ENROLL_DISPUTE_MERCHANT`

Irreversibly activate Disputes v3 handling for one direct Klarna merchant account. This account onboarding cannot be undone through the API. Partners cannot use this operation to enroll individual merchants; HTTP 204 also means the merchant was already enrolled.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `merchant_id` | string | Yes | Direct Klarna merchant account ID to irreversibly enroll. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Enroll Dispute Partner

**Slug:** `KLARNA_ENROLL_DISPUTE_PARTNER`

Irreversibly activate Disputes v3 handling for one Klarna partner account. This account onboarding cannot be undone through the API. partner_id identifies the partner account and client_id supplies the merchant OAuth2 client ID in the request body. Merchants cannot use this operation to enroll a partner; HTTP 204 also means the partner was already enrolled.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `client_id` | string | Yes | Merchant OAuth2 client ID used for partner onboarding. Must contain only ASCII letters and digits and be 1-64 characters long. |
| `partner_id` | string | Yes | Klarna partner account ID to irreversibly enroll. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Extend Capture Due Date

**Slug:** `KLARNA_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. Fetch the options before this action because some extensions can cost money.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID containing the capture. |
| `capture_id` | string | Yes | Klarna capture ID to extend. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |
| `due_date_extension` | object | Yes | Due-date extension option previously returned by Klarna. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Extend Order Authorization Time

**Slug:** `KLARNA_EXTEND_ORDER_AUTHORIZATION_TIME`

Extend the authorization validity period for an order that is still AUTHORIZED and delayed unexpectedly. Call this before capture or release changes the order state; Klarna does not allow extension after the order expires or is cancelled. For routinely long fulfillment periods, arrange extended authorization during merchant onboarding instead.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID whose authorization time should be extended. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Capture

**Slug:** `KLARNA_GET_CAPTURE`

Return one Klarna capture by order ID and capture ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Unique Klarna order ID containing the capture. |
| `capture_id` | string | Yes | Unique Klarna capture ID to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Card Promise

**Slug:** `KLARNA_GET_CARD_PROMISE`

Retrieve a Klarna card promise and its card specifications. This Merchant Card Service operation requires Virtual Card Number (VCN) entitlement.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `promise_id` | string | Yes | Unique card promise identifier. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Card Settlement

**Slug:** `KLARNA_GET_CARD_SETTLEMENT`

Retrieve a Klarna card settlement by settlement ID or by its associated order ID. Select the identifier with lookup_by and provide only its corresponding field. This Merchant Card Service operation requires Virtual Card Number (VCN) entitlement and returns encrypted card material that must be handled securely.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | No | Klarna order ID associated with the settlement. |
| `lookup_by` | string ("settlement_id" | "order_id") | No | Identifier type to use: settlement_id retrieves a specific settlement; order_id retrieves the settlement associated with an order. When omitted, the action infers it from the one supplied identifier. |
| `settlement_id` | string | No | Unique settlement identifier. |
| `card_data_encryption_key_id` | string | Yes | Public-key identifier Klarna used to encrypt the returned card data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Checkout Order

**Slug:** `KLARNA_GET_CHECKOUT_ORDER`

Return a legacy Klarna Checkout order by order ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna Checkout order ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Customer Token

**Slug:** `KLARNA_GET_CUSTOMER_TOKEN`

Return a reusable Klarna customer token and its current status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `customer_token` | string | Yes | Reusable Klarna customer token to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Dispute

**Slug:** `KLARNA_GET_DISPUTE`

Return a fully detailed Klarna Disputes v3 record, including associated merchant and customer evidence. The response preserves provider-added fields and accepts all current or future state values.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_dispute_id` | string | Yes | Klarna payment dispute ID to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get HPP Session

**Slug:** `KLARNA_GET_HPP_SESSION`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `session_id` | string | Yes | HPP session ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Order

**Slug:** `KLARNA_GET_ORDER`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Unique Klarna order ID to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Payment Session

**Slug:** `KLARNA_GET_PAYMENT_SESSION`

Return the current details of a Klarna Payments session by session ID. The response may contain sensitive client or authorization tokens; do not log or persist them.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `session_id` | string | Yes | Unique ID of the Klarna Payments session to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Payout

**Slug:** `KLARNA_GET_PAYOUT`

Return one Klarna payout by payment reference.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payment_reference` | string | Yes | Reference ID of the payout, normally found on the payment slip or bank statement. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Payout Summary

**Slug:** `KLARNA_GET_PAYOUT_SUMMARY`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end_date` | string | Yes | Inclusive payout-range end as an ISO 8601 date or date-time. A date alone starts at 00:00:00; use 23:59:59 for the full final day. |
| `start_date` | string | Yes | Inclusive payout-range start as an ISO 8601 date or date-time. A date alone starts at 00:00:00; use a full timestamp to avoid ambiguity. |
| `currency_code` | string | No | Optional ISO 4217 currency code used to filter the summaries. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Refund

**Slug:** `KLARNA_GET_REFUND`

Return one Klarna refund by order ID and refund ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Unique Klarna order ID containing the refund. |
| `refund_id` | string | Yes | Unique Klarna refund ID to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get VCC Order Cancellation

**Slug:** `KLARNA_GET_VCC_ORDER_CANCELLATION`

Retrieve the asynchronous cancellation status for a Klarna order with a Virtual Credit Card settlement. This operation requires Virtual Card Number (VCN) entitlement and does not itself change the order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID whose Virtual Credit Card cancellation status to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Capture Due Date Options

**Slug:** `KLARNA_LIST_CAPTURE_DUE_DATE_OPTIONS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID containing the capture. |
| `capture_id` | string | Yes | Klarna capture ID whose due-date extension options to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Disputes

**Slug:** `KLARNA_LIST_DISPUTES`

Return one page of Klarna Disputes v3 records using all documented filters. Repeated-array and CSV query serialization follow the provider contract; use next_cursor to request one additional page.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `size` | integer | No | Maximum number of disputes to return on this page. |
| `state` | array | No | Dispute states to match. Serialized as repeated state query values. |
| `cursor` | string | No | Opaque continuation cursor returned by a previous call. It restores that call's filters and page size and requests exactly one next page. |
| `reason` | array | No | Dispute reasons to match. Serialized as repeated reason query values. |
| `sort_by` | array | No | Sort fields in priority order. Serialized as one comma-separated sort_by value; a leading minus sorts that field descending. |
| `merchant_id` | array | No | Merchant IDs to match. Serialized as repeated merchant_id query values. |
| `closed_at_end` | array | No | Exclusive dispute-close timestamps in ISO 8601 format. Serialized as repeated closed_at_end query values exactly as documented by Klarna. |
| `opened_at_end` | array | No | Exclusive dispute-open timestamps in ISO 8601 format. Serialized as repeated opened_at_end query values exactly as documented by Klarna. |
| `starting_after` | string | No | Raw pagination.last_item value from a prior provider response. Prefer cursor for continuation; cursor takes precedence when both are supplied. |
| `closed_at_start` | array | No | Inclusive dispute-close timestamps in ISO 8601 format. Serialized as repeated closed_at_start query values exactly as documented by Klarna. |
| `opened_at_start` | array | No | Inclusive dispute-open timestamps in ISO 8601 format. Serialized as repeated opened_at_start query values exactly as documented by Klarna. |
| `purchase_references` | array | No | Merchant purchase references to match, each 1-255 characters. Serialized as repeated purchase_references query values. |
| `payment_transaction_id` | array | No | Payment transaction IDs to match, each at most 255 characters. Serialized as repeated payment_transaction_id query values. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Order Captures

**Slug:** `KLARNA_LIST_ORDER_CAPTURES`

Return all captures recorded for a Klarna order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Unique Klarna order ID whose captures should be returned. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Payouts

**Slug:** `KLARNA_LIST_PAYOUTS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `size` | integer | No | Number of payouts to return on this page (1-500; default 20). |
| `cursor` | string | No | Continuation cursor returned by a previous call. It restores that call's filters and page size and takes precedence over offset. |
| `offset` | integer | No | Zero-based collection offset for the first page. |
| `end_date` | string | No | Optional inclusive payout-date end as an ISO 8601 date or date-time. A date alone starts at 00:00:00; use 23:59:59 for the full final day. |
| `start_date` | string | No | Optional inclusive payout-date start as an ISO 8601 date or date-time. A date alone starts at 00:00:00; use a full timestamp to avoid ambiguity. |
| `currency_code` | string | No | Optional ISO 4217 currency code used to filter payouts. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Settlement Transactions

**Slug:** `KLARNA_LIST_SETTLEMENT_TRANSACTIONS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `size` | integer | No | Number of transactions to return in this page (maximum 500). |
| `cursor` | string | No | Continuation cursor from a previous call. Omit it for the first page; when supplied, it preserves the original filters and page size. |
| `offset` | integer | No | Offset at which this page starts. |
| `order_id` | string | No | Optional Klarna-assigned order ID used to filter transactions. |
| `payment_reference` | string | No | Optional payout reference used to filter settlement transactions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Refund Order

**Slug:** `KLARNA_REFUND_ORDER`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `refund` | object | Yes | Refund amount, line items, and references. |
| `order_id` | string | Yes | Klarna order ID to refund. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Release Remaining Authorization

**Slug:** `KLARNA_RELEASE_REMAINING_AUTHORIZATION`

Irreversibly release the uncaptured authorization remaining on a Klarna order. Use only when no further capture is needed; this does not refund captured funds. This may also normalize the order total: in live testing, a partial capture followed by release reduced order_amount to captured_amount.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID whose uncaptured authorization should be released. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Request Customer Token Cancellation

**Slug:** `KLARNA_REQUEST_CUSTOMER_TOKEN_CANCELLATION`

Request asynchronous cancellation of a reusable Klarna customer token by changing its status to CANCELLED. Once Klarna processes the request, the token can no longer be used for new orders; HTTP 202 confirms acceptance, not that the state change has completed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `status_update` | object | Yes | Required status change to submit for the customer token. |
| `customer_token` | string | Yes | Reusable Klarna customer token to cancel. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Request VCC Order Cancellation

**Slug:** `KLARNA_REQUEST_VCC_ORDER_CANCELLATION`

Irreversibly request cancellation of a Klarna order associated with a Virtual Credit Card settlement. This operation requires Virtual Card Number (VCN) entitlement. It mutates the order: an existing cancellation returns CANCELLED, while a new request is queued asynchronously and returns PENDING.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID to cancel. The order must have an associated Virtual Credit Card settlement. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Resend Capture Customer Communication

**Slug:** `KLARNA_RESEND_CAPTURE_CUSTOMER_COMMUNICATION`

Irreversibly resend Klarna customer communication for a capture. Calling this action has an operational side effect: Klarna sends a communication to the customer.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID containing the capture. |
| `capture_id` | string | Yes | Klarna capture ID whose customer communication should be resent. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Respond to Dispute

**Slug:** `KLARNA_RESPOND_TO_DISPUTE`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `evidence` | string | Yes | Reason-specific evidence response matching the dispute reason. |
| `payment_dispute_id` | string | Yes | ID of the dispute whose evidence request is being answered. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Checkout Order

**Slug:** `KLARNA_UPDATE_CHECKOUT_ORDER`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna Checkout order ID. |
| `checkout_order` | object | No | Legacy Checkout V3 order properties to update. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Order Authorization

**Slug:** `KLARNA_UPDATE_ORDER_AUTHORIZATION`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID to update. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |
| `authorization_update` | object | Yes | New authorization amount and optional replacement order lines. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Order Customer Details

**Slug:** `KLARNA_UPDATE_ORDER_CUSTOMER_DETAILS`

Update the permitted customer address details on an existing order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID whose customer details will be updated. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |
| `customer_details` | object | Yes | Customer shipping details to update. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Order Merchant References

**Slug:** `KLARNA_UPDATE_ORDER_MERCHANT_REFERENCES`

Update the merchant reference values stored on a Klarna order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_id` | string | Yes | Klarna order ID to update. |
| `idempotency_key` | string | No | Unique key for this logical operation, preferably a UUID v4. Reuse the same key only when retrying that operation. |
| `merchant_references` | object | Yes | New merchant reference values for the order. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Payment Session

**Slug:** `KLARNA_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. Klarna returns no session data after a successful update.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `session_id` | string | Yes | ID of the existing Klarna Payments session to update. |
| `session_update` | object | Yes | Complete set of mutable session fields to send as the POST body. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload Dispute Attachment

**Slug:** `KLARNA_UPLOAD_DISPUTE_ATTACHMENT`

Upload one merchant evidence attachment to a Klarna payment dispute. Klarna limits attachments to 7 MB.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | Merchant evidence file to upload. Klarna accepts JPG, JPEG, PNG, PDF, and DOCX files up to 7 MB. |
| `filename` | string | No | Optional provider filename. It must contain no whitespace and end in .jpg, .jpeg, .png, .pdf, or .docx. |
| `payment_dispute_id` | string | Yes | ID of the Klarna payment dispute that will own the attachment. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload Dispute Attachments

**Slug:** `KLARNA_UPLOAD_DISPUTE_ATTACHMENTS`

Upload 1-10 merchant evidence attachments to one Klarna payment dispute, sequentially in input order. Each successful upload creates a separate attachment resource. The batch is not atomic: if a later upload fails, attachments uploaded earlier remain created.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `attachments` | array | Yes | One to 10 merchant evidence attachments to upload sequentially in the given order. |
| `payment_dispute_id` | string | Yes | ID of the Klarna payment dispute that will own the attachments. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
