HomeDocumentationAPI Reference
Documentation
Klarna Logo

Klarna is the largest provider of pay-later services in the world. It offers flexible payment options, giving customers more freedom to choose when and how to pay for a purchase. Klarna provides payment solutions for 90 million consumers and over 250+ thousand retailers across 19 core markets.

Klarna payment flow


Properties

Type of Payment
Online
Chargebacks
Yes
Consumer Currency
AUD, CHF, DKK, EUR, GBP, NOK, SEK, USD
Consumer Country
Austria, Australia, Belgium, Denmark, Finland, France, Germany, Italy, Netherlands, Norway, Spain, Sweden, Switzerland, United Kingdom, United States
Expiry Period
URL Expiry is usually 48 hours after its creation. A consumer will be able to pay on the hosted payment page until 1 hour before the Payment Session expiration.

Once the order is created the supplier has 7 days to capture it.
Recurring Payments
No
Partial Payment
Yes
Capture of an amount less the then original authorization is supported, however only a single partial payment is supported at this time.
Refunds
Yes

Sample checkout

POST https://checkout.rch.io/v2.21

{
  "MerchantId": "ee54106f-30b8-45df-b62f-b649fc80eafd",
  "ReferenceId": "1621468436723",
  "ConsumerCurrency": "USD",
  "PaymentMethod": "KLARNA",
  "Capture": false,
  "Items": [
    {
      "Description": "Thingy",
      "ConsumerPrice": 100,
      "Quantity": 1,
      "Sku": "4383471583721"
      "ImageUrl": "test.jpg"
    }
  ],
  "Consumer": {
    "Name": "Big Red",
    "Email": "[email protected]",
    "Phone": "3337678899",
    "Address": "223 elm tree",
    "City": "place",
    "Region": "Hamburg",
    "PostalCode": "20",
    "Country": "US"
  },
  "DeviceFingerprint": "c41487d2-6654-4d6a-8e55-2f3d92b285f8",
  "StashId": null,
  "Return": "https://checkout.rch.red/return.php"
}
{
  "OrderId": "c29173aa-dffb-400e-8a03-0a6636e77719",
  "UnderReview": false,
  "Expiry": "2021-05-21T23:54:02Z",
  "Authorized": false,
  "Completed": false,
  "Captured": false,
  "Action": {
    "Redirect": "https://sandbox.withreach.com/auth/9a2c1f80-01b5-4cb4-90ae-c8adcb85cb0a"
  }
}

Technical considerations

In some regions, such as the US and UK, Klarna may choose to perform additional fraud screening on your order requests. If a payment is flagged for review, the transaction state will be held in CommitAccepted until we have received final authorization from Klarna.

When you attempt to capture an order in this state, the capture response will return with Completed=false. You should then wait for the notification informing you that the order has transitioned to Processed or Processing Failed.

See States and Events and POST /capture for details.

Related Information

Klarna guide

Klarna is a payment method that allows customers to pay for purchases using both immediate and deferred payments. Klarna includes various payment options, based on the customer’s region, including:

  • Pay now: supports direct debit, major credit cards, and Sofort.
  • Pay later: pay in 14, 21, or 30 days.
  • Pay over time (pay in): pay in 3 or 4 equal instalments.

The supplier's benefit is that full payment is received at the time of purchase, and Klarna collects the payments from the customer.

Implementation

Implementing Klarna through Reach is as simple as integrating it with our other payment products. Once configured through our supplier support, when the customer's checkout is rendered in a region where Klarna is available, the Klarna payment method will be visible for customer selection. When the customer selects Klarna, they will be redirected to Klarna’s hosted checkout page. Customers are redirected to the supplier site when they complete their purchase.

Custom branding options

To further enhance your customers' Klarna-hosted payment experience, you can provide a feature image or logo that matches your branding.

Contact the [supplier support team](mailto: [email protected]?subject=Klarna Custom Branding Request) for assistance.

Default and customized checkout comparison

Note

Your feature image may appear slightly darker at the Klarna checkout

On-site messaging

On-site messaging (OSM) is a platform offered by Klarna that provides the ability to include tailored messaging on the supplier’s website. Using on-site messaging, you can better inform your customers of the options available through the Klarna payment method (e.g., Pay in instalments).

Integration of Klarna’s on-site messaging generally follows the guide provided on Klarna’s website, with minor changes to allow integration within the Reach ecosystem.

To enable this capability, you must include the Klarna JavaScript library on your page according to Klarna’s documentation and set the src and data-client-id parameters with the appropriate values as returned from a call to Reach's /getPaymentMethods endpoint.

Notes

Klarna provides different JavaScript libraries and client IDs for different regions. Please ensure you include the correct country code, currency, or locale when the call to getPaymentMethods to retrieve the URL and client ID. Use the response values and dynamically set them on your page. Mapping PaymentMethod]{"code.Parameters.ClientId -> data-client-id PaymentMethod {"codes.Parameters.OnSiteJavaScriptUrl -> src

Klarna suggests including the script tag in the first element of the page’s body. However, it is possible to include the script dynamically after retrieving the URL and client ID from the /getPaymentMethods call.

{
      "Id": "KLARNA",
      "Name": "Klarna",
      "Class": "Online",
      "Language": "en",
      "Local": true,
      "Parameters": {
        "ClientId": "11111111-2222-3333-4444-555555555555",
        "OnSiteJavaScriptUrl": "https://eu-library.klarnaservices.com/lib.js"
      }
    }
let script = document.createElement('script');
 // the url provided by getPaymentMethods
script.src = <source>;
// the client ID provided by getPaymentMethods
script.setAttribute('data-client-id’, <client ID>);
script.async = true;
// ID so we can replace the script for region changes
script.id = 'klarna';
document.body.appendChild(script);
// refresh the adds after attaching the script
window.KlarnaOnsiteService = window.KlarnaOnsiteService || []
window.KlarnaOnsiteService.push({ eventName: 'refresh-placements' })
<script
    src="https://eu-library.klarnaservices.com/lib.js"
    async
    data-client-id="11111111-2222-3333-4444-555555555555"
></script>

Including on-site messages

The on-site messages themselves are included in the page using Klarna placement tags. Klarna provides information about using placement tags on their site.

If you are using amount-based placements, the data-purchase-amount should be provided as a whole number. For example, $29.99 should be set as 2999 with the decimal place excluded.

If invalid information is provided to the tags, or Klarna is not available for the customer's region, the tags will not be displayed.

Klarna on-site messages integration requirements

It is a requirement that suppliers add a Klarna FAQ link to the site footer, utilizing the FAQ OSM script. The associated placement data-key is 'info-page,' and suppliers should pass the appropriate locale based on the customer's region.

The following code should be added to the page where you want the content to be displayed:

<!-- Placement v2 -->
<klarna-placement
  data-key="info-page"
  data-locale="en-SE"
></klarna-placement>
<!-- end Placement -->

This will dynamically include the appropriate Klarna FAQ and explain the payment options available in the customer's region. Below is an example of Klarna's FAQ.