Klarna Docs - On-site messaging
On-site messaging

On-site messaging is a platform that enables you to add tailored messaging to your website. With on-site messaging, you can inform shoppers about the different payment options available as they browse your site. By using Klarna, customers have access to flexible payment options in the checkout; on-site messaging is a great way to let them know even before they decide to buy.

The Klarna Payment cartridge provides multiple options in the standard implementation based on the reference architecture:

1. Product Page and Cart-based promotions

  • Sitewide
  • Top Banner strip

2. Footer logo

3. Custom Info-page

You can find the configuration in Merchant Tools / Site Preferences / Custom Preference under Klarna_OSM group:

  • To enable Klarna OSM implementation in storefront, osm_enable must be set to true.
  • osm_theme dropdown is used to apply a theme to OSM. Options include default, dark, and custom.
  • To enable placement in PDP, cart, header, footer, and info page, osm_placement is enabled in the multi-select dropdown. Placement tag ID is hardcoded from code.
PlacementTagID
Product Pagecredit-promotion-auto-size
Cart Pagecredit-promotion-badge
Site Wide Bannertop-strip-promotion-badge
FAQinfo-page
Footerfooter-promotion-auto-size

Placement styling is taken from osm_placement_styling, which is a JSON. osmLibraryURL is hardcoded and retrieved from constants. osmEnvironment is used from KlarnaPayments.

CSS customizations are available only for the new OSM library version. Please follow Klarna guidance for placement styling - Styling On-Site Messaging with CSS.

OSM Configuration in BM

OSM Configuration in BM

In addition to the above, if you wish to display the dedicated (custom) Klarna info OSM page you can use the following controller endpoint KlarnaPayments-InfoPage. For example, update the footer-about content asset to include this line of code as shown below:

MARKDOWN
<li><a href="$url('KlarnaPayments-InfoPage')$" title="Go to Klarna Info">Klarna Info</a></li>
Footer asset update
On-Site Messaging on footer and linked to Klarna Info Page
On-Site Messaging on header & dedicated Klarna info page

For more information regarding OSM customizations and best practices, please refer to the Klarna Developer Docs. Integration Best Practices and information about Klarna Branding and Co-marketing options can be found here.

It is the merchant’s responsibility to ensure that user consent is collected when required for OSM placements for your local market to abide by legal requirements, e.g., EU cookie-guide in Klarna Merchant Portal.