Klarna payment methods

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 Credit, or make use of other payment methods made available by Klarna. Klarna offers these payment methods via a widget, called Klarna Payments widget or just "the 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 Payments API, 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 Payments 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 Initiate and load the widget where Klarna displays the widget and it's payment methods to the customer
  3. Authorize: When the consumer presses the buy button on your page, request an authorization token
  4. Place order: Once the order is authorized, place the order using the authorization token from the previous step.

‚ÄčYou will also learn how to implement Klarna Order Management calls for captures, refunds, cancellations after the order is placed, or if you like use our Merchant Portal to get started manually instead.

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.