Klarna Payments



This tutorial helps you integrate Klarna's standalone payment methods on your website.

By adding Klarna's payment methods, you enable your consumers to try before they buy, finance purchases on your store via Klarna, or make use of other payment methods made available by Klarna. Klarna offers these payment methods via a widget which you add inline on your checkout page.

Klarna's Payments widget lets you

  • easily add Klarna's payment methods in your checkout
  • integrate this using a JSON REST API and a JavaScript SDK
  • apply your visual guidelines to get a branded experience


Integration Components

Klarna’s widget contains the following integration components:

  • a JavaScript SDK that you use to render and interact with the Klarna widget, client-side
  • a REST API used for creating a credit session and creating an order, server-side

Reference documentation is available for both the JavaScript SDK and the REST API.

Integration Process Overview

Here is a high level overview of the steps involved in an integration

  1. Create session: When the customer proceeds to your checkout page, create a session with Klarna
  2. Present widget When you want to display the Klarna payment method to the customer, initiate and load the widget.
  3. Authorize: When the customer presses the buy button on your page, make an authorization request
  4. Place order: Once the order is authorized successfully, place the order using the authorization token from the previous step.

After the order is created, you can manage the order either manually via our Merchant Portal or through our Order Management API.

Test Account

If you want to use Klarna’s test environment you must get a test account.

Let's start!

Our Integration guide will walk you through it. Your first step is to create a session.