Klarna Partner Product API - Messaging (release/3)

Download OpenAPI specification:Download

Authentication

klarna_api_key

Use the Klarna API key as HTTP Basic Authentication credentials

Security Scheme Type API Key
Header parameter name: Authorization

klarna_partner_account

Klarna Partner Account ID when acting on-behalf of another account

Security Scheme Type API Key
Header parameter name: Klarna-Partner-Account

Credit Promotion

Get credit promotion messaging for auto-size placement

Request
path Parameters
account_id
required
string (AccountIdentifier)

Identifier of the Account the action is done on behalf of

Example: krn:partner:global:account:live:LWT2XJSE
query Parameters
locale
required
string

Locale to use for returned content.

Example: locale=en-US
payment_amount
required
integer

The amount of money in micro-unites ($122.00 = 12200).

Example: payment_amount=12200
custom_payment_method_ids
string

You can dynamically trigger promotional credit offers. First, work with Klarna’s responsible account manager to determine the criteria for custom offers and a standard naming convention that will be referred to when requesting such offers via Klarna payments API. To be able to advertise these payment methods, pass the names as an array of strings to the On-site messaging placement. The array can be used to define which of the configured payment options within a payment category (pay_later, pay_over_time, and so on) should be included in the content selection.

Example: custom_payment_method_ids=FINANCING0
message_preference
string
Default: "klarna"

Allows the partner to indicate preference for the message type. If no value is passed or an unrecognized value is provided, the default "klarna" message will be used. Passing "in-store" adjusts the content to display "in-store" related message, while passing "prequalification" adjusts the message to display the prequalification related content.

Enum: "klarna" "in-store" "prequalification"
Example: message_preference=in-store
message_prefix
string

Prefixes the content of the message. Allowed values: Or, or

Enum: "Or" "or"
Example: message_prefix=Or
Responses
200

Successful response

204

No messaging available for the given parameters.

400

Bad request.

get/v1/accounts/{account_id}/payment/messaging/credit-promotion-auto-size
Request samples
curl -i -X GET \
  'https://api-global.klarna.com/v1/accounts/{account_id}/payment/messaging/credit-promotion-auto-size?locale=string&payment_amount=0&custom_payment_method_ids=string&message_preference=klarna&message_prefix=Or' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "content": {
    }
}

Get credit promotion messaging for badge placement

Request
path Parameters
account_id
required
string (AccountIdentifier)

Identifier of the Account the action is done on behalf of

Example: krn:partner:global:account:live:LWT2XJSE
query Parameters
locale
required
string

Locale to use for returned content.

Example: locale=en-US
payment_amount
required
integer

The amount of money in micro-unites ($122.00 = 12200).

Example: payment_amount=12200
custom_payment_method_ids
string

You can dynamically trigger promotional credit offers. First, work with Klarna’s responsible account manager to determine the criteria for custom offers and a standard naming convention that will be referred to when requesting such offers via Klarna payments API. To be able to advertise these payment methods, pass the names as an array of strings to the On-site messaging placement. The array can be used to define which of the configured payment options within a payment category (pay_later, pay_over_time, and so on) should be included in the content selection.

Example: custom_payment_method_ids=FINANCING0
message_preference
string
Default: "klarna"

Allows the partner to indicate preference for the message type. If no value is passed or an unrecognized value is provided, the default "klarna" message will be used. Passing "in-store" adjusts the content to display "in-store" related message, while passing "prequalification" adjusts the message to display the prequalification related content.

Enum: "klarna" "in-store" "prequalification"
Example: message_preference=in-store
message_prefix
string

Prefixes the content of the message. Allowed values: Or, or

Enum: "Or" "or"
Example: message_prefix=Or
Responses
200

Successful response

204

No messaging available for the given parameters.

400

Bad request.

get/v1/accounts/{account_id}/payment/messaging/credit-promotion-badge
Request samples
curl -i -X GET \
  'https://api-global.klarna.com/v1/accounts/{account_id}/payment/messaging/credit-promotion-badge?locale=string&payment_amount=0&custom_payment_method_ids=string&message_preference=klarna&message_prefix=Or' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "content": {
    }
}

Top Strip

Get top strip promotion messaging for auto-size placement

Request
path Parameters
account_id
required
string (AccountIdentifier)

Identifier of the Account the action is done on behalf of

Example: krn:partner:global:account:live:LWT2XJSE
query Parameters
locale
required
string

Locale to use for returned content.

Example: locale=en-US
message_preference
string
Default: "klarna"

Allows the partner to indicate preference for the message type. If no value is passed or an unrecognized value is provided, the default "klarna" message will be used. Passing "in-store" adjusts the content to display "in-store" related message, while passing "prequalification" adjusts the message to display the prequalification related content.

Enum: "klarna" "in-store" "prequalification"
Example: message_preference=in-store
message_prefix
string

Prefixes the content of the message. Allowed values: Or, or

Enum: "Or" "or"
Example: message_prefix=Or
Responses
200

Successful response

204

No messaging available for the given parameters.

400

Bad request.

get/v1/accounts/{account_id}/payment/messaging/top-strip-promotion-auto-size
Request samples
curl -i -X GET \
  'https://api-global.klarna.com/v1/accounts/{account_id}/payment/messaging/top-strip-promotion-auto-size?locale=string&message_preference=klarna&message_prefix=Or' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "content": {
    }
}

Get top strip promotion messaging for badge placement

Request
path Parameters
account_id
required
string (AccountIdentifier)

Identifier of the Account the action is done on behalf of

Example: krn:partner:global:account:live:LWT2XJSE
query Parameters
locale
required
string

Locale to use for returned content.

Example: locale=en-US
message_preference
string
Default: "klarna"

Allows the partner to indicate preference for the message type. If no value is passed or an unrecognized value is provided, the default "klarna" message will be used. Passing "in-store" adjusts the content to display "in-store" related message, while passing "prequalification" adjusts the message to display the prequalification related content.

Enum: "klarna" "in-store" "prequalification"
Example: message_preference=in-store
message_prefix
string

Prefixes the content of the message. Allowed values: Or, or

Enum: "Or" "or"
Example: message_prefix=Or
Responses
200

Successful response

204

No messaging available for the given parameters.

400

Bad request.

get/v1/accounts/{account_id}/payment/messaging/top-strip-promotion-badge
Request samples
curl -i -X GET \
  'https://api-global.klarna.com/v1/accounts/{account_id}/payment/messaging/top-strip-promotion-badge?locale=string&message_preference=klarna&message_prefix=Or' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "content": {
    }
}

Checkout

Get messaging for checkout placement

Request
path Parameters
account_id
required
string (AccountIdentifier)

Identifier of the Account the action is done on behalf of

Example: krn:partner:global:account:live:LWT2XJSE
query Parameters
locale
required
string

Locale to use for returned content.

Example: locale=en-US
custom_payment_method_ids
string

You can dynamically trigger promotional credit offers. First, work with Klarna’s responsible account manager to determine the criteria for custom offers and a standard naming convention that will be referred to when requesting such offers via Klarna payments API. To be able to advertise these payment methods, pass the names as an array of strings to the On-site messaging placement. The array can be used to define which of the configured payment options within a payment category (pay_later, pay_over_time, and so on) should be included in the content selection.

Example: custom_payment_method_ids=FINANCING0
payment_amount
required
integer

The amount of money in micro-unites ($122.00 = 12200).

Example: payment_amount=12200
Responses
200

Successful response

204

No messaging available for the given parameters.

400

Bad request.

get/v1/accounts/{account_id}/payment/messaging/checkout
Request samples
curl -i -X GET \
  'https://api-global.klarna.com/v1/accounts/{account_id}/payment/messaging/checkout?locale=string&custom_payment_method_ids=string&payment_amount=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "content": {
    }
}

Capabilities

Get merchant placements, clientId in OSM by MID or clientId(UUID).

Request
path Parameters
account_id
required
string (AccountIdentifier)

Identifier of the Account the action is done on behalf of

Example: krn:partner:global:account:live:LWT2XJSE
query Parameters
mid
string

MID of the merchant.

Example: mid=K12345
client_id
string

Client ID(UUID) of the merchant.

Example: client_id=5fb4f264-dd9b-5df9-82d4-e7d88fcfaa89
Responses
200

Successful response

400

Bad request.

404

Bad request.

get/v1/accounts/{account_id}/payment/messaging/capabilities
Request samples
curl -i -X GET \
  'https://api-global.klarna.com/v1/accounts/{account_id}/payment/messaging/capabilities?mid=string&client_id=string' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "client_id": "5fb4f264-dd9b-5df9-82d4-e7d88fcfaa89",
  • "countries": [
    ],
  • "placements": [
    ]
}

Payment Options

Returns individual payment options, customers previous selected payment method and payment source if customer_token is passed in req body.

Returns all individual payment options (e.g. Financing 6 and Financing 12 are different items in the response, no grouping is applied).

Request
path Parameters
account_id
required
string (AccountIdentifier)

Identifier of the Account the action is done on behalf of

Example: krn:partner:global:account:live:LWT2XJSE
Request Body schema: application/json
payment_amount
integer

The amount of money in micro-unites ($122.00 = 12200).

locale
required
string

Locale to use for returned content.

currency
required
string (Currency) ^[A-Za-z]{3}$

Currency in ISO 4217 format.

Supported currencies:

  • AUD
  • EUR
  • CAD
  • CZK
  • DKK
  • HUF
  • MXN
  • NZD
  • NOK
  • PLN
  • RON
  • SEK
  • CHF
  • GBP
  • USD
customer_token
required
string
Default: ""

This token is used to identify the customer, and based on it, Klarna's underlying services (OKTS) will return the specific payment method and source that the returning Klarna customer selected in previous transactions.

Responses
200

Successful response

400

Bad request.

post/v1/accounts/{account_id}/payment/messaging/payment-options
Request samples
application/json
{
  • "payment_amount": 20000,
  • "locale": "en-US",
  • "currency": "USD",
  • "customer_token": "krn:okts-eu:one-klarna-token:0fbc4a5c-d7e6-453c-b07f-bd77a2cbb802"
}
Response samples
application/json
{}