Integrate Messaging API to display branded payment options when SDK use isn’t feasible, ensuring a consistent and compliant checkout experience.
Integrate Klarna On-site Messaging using the Messaging API when Klarna SDK cannot be used due to infrastructure limitations. This integration allows you to display Klarna-branded promotional messages dynamically on your website, including product pages, cart pages, and banners.
When the Klarna SDK cannot be implemented, the Messaging API provides an alternative way to retrieve localized content such as text, icons, and links that adapt to transaction amounts and customer context. This ensures that customers are informed about Klarna’s flexible payment options before reaching checkout.
Before you integrate On-site messaging, check that you meet the following prerequisites:
Here's an overview of all the steps to add On-site messaging using Messaging API into your website:
context (INFO vs AUTH). (Optional)All placement APIs share a common base path. Use the following pattern and specify the appropriate placement key: {path}/messaging/{placement_key}
Placements Keys:
credit-promotion-auto-sizecredit-promotion-badgetop-strip-promotion-auto-sizetop-strip-promotion-badge| Placement types | Characteristics |
|---|---|
| Displays interactive Klarna messaging. Your customers can click on it and expand the information on the payment methods with calculated prices. Mentions Klarna inline as part of the text. |
| Displays interactive Klarna messaging. Your customers can click on it and expand the information on the payment methods with calculated prices. Displays Klarna's logo in svg, |
/v2/accounts/{partner_account_id}/payment/messaging/credit-promotion-auto-size| Parameter | Required | Description |
|---|---|---|
partner_account_id | Yes | Unique account identifier assigned by Klarna to the onboarded merchant |
/v2/accounts/{partner_account_id}/payment/messaging/credit-promotion-badge| Parameter | Required | Description |
|---|---|---|
partner_account_id | Yes | Unique account identifier assigned by Klarna to the onboarded merchant |
Top strip placements are non-amount based and similar to credit promotion placements we can use the same API to retrieve top-strip-promotion-auto-size and top-strip-promotion-badge

Each placement has an unique key that should be used in order to specify the placement to be displayed.
| Placement types | Options |
|---|---|
| Recommended as static asset at the top of the pages of your online store. Displays interactive Klarna messaging. Your customers can click on it and expand the information on the payment methods. Mentions Klarna inline as part of the text. |
| Recommended as static at the top of the pages of your online store. Displays interactive Klarna messaging. Your customers can click on it and expand the information on the payment methods. |
/v2/accounts/{partner_account_id}/payment/messaging/top-strip-promotion-auto-size| Parameter | Required | Description |
|---|---|---|
partner_account_id | Yes | Unique account identifier assigned by Klarna to the onboarded merchant |
/v2/accounts/{partner_account_id}/payment/messaging/top-strip-promotion-badge| Parameter | Required | Description |
|---|---|---|
partner_account_id | Yes | Unique account identifier assigned by Klarna to the onboarded merchant |
The message.parts[].context field determines how links such as Learn more or Check purchase power should behave.
INFO: Informational content. Can open within the same tab, iframe, or WebView.AUTH: Requi Requires customer authentication. Must open in a new browser tab or window. For native implementations: