Klarna Payments
Klarna Payments is NOT the same as Sofortüberweisung! Please refer to this chapter, if you want to use Sofortüberweisung!
Klarna Payments is a 3rd party payment method, that is split into three ways of payment:
  • Pay Now: The order is payed now, via Direct Debit, or Bank Transfer.
  • Pay Later: The order is payed on invoice.
  • Slice it: The order is payed in installment rates, with an interest.
These, together with the currencies, are defined in the Klarna contract and not on Saferpay side. With each start of a new transaction, Saferpay will ask Klarna for this information. If a currency was submitted with the Payment Page Initialize Request, that isn't supported, or a certain payment category is not activated on the Klarna account, Saferpay will not show said option.
This can also lead to Klarna Payments not being displayed altogether. So please make sure, that your Klarna account is set up correctly and that you use the correct currency!

Requirements

Klarna Payments only works via the Saferpay Payment page and requires the following things to be met:
  • The corresponding Saferpay eCommerce licence and thus the existence of a valid identification with a username and password for the Saferpay system.
  • Availability of at least one active Saferpay E Commerce terminal, via which payment can be carried out and availability of the associated Saferpay TerminalId.
  • A valid contract with Klarna. Please contact [email protected]

Supported features

Feature
Support
Secure Card Data
Refunds
Recurring Payments
3D Secure
Dynamic Currency Conversion (DCC)
Mail Phone Order
Testing

Activation

Unlike other payment methods, Klarna payments offers a self-onboarding service, which you can access inside the Backoffice under Settings > Terminals. Please select the terminal you want Klarna activated on and scroll down to Self Service.
This service handles differently, depending on the Saferpay environment (test|live) you are on, so please pay close attention.
You'll have two options Klarna and additionally, on the Saferpay test-environment, Klarna Simulator.

Activation on the Test-Environment

Simulator

The Klarna Simulator is a Sandbox provided by Saferpay, which provides an extensive GUI for testing Klarna. In order to activate it, you first need to click on Configure. There you have to set a user and password, which can be anything for the simulator. However should you enter nothing, the simulator will simulate an error, as if no, or the wrong credentials have been entered. So if you want to test that case, you can do so. Then the Environment slider will simulate live and sandbox (Test) behavior, if you want, though the differences are slim. Lastly, you have to activate the countries, you want to support Klarna in. More on that later.
(click to enlarge)
Once this is done, click on Save, however you also need to activate the Simulator, by clicking on the activation-slider:
(click to enlarge)
That is it! You can now use the Saferpay Klarna Simulator. And this is the Simulator on the Payment Page. Note the indicator at the top, telling you, that you are using the Saferpay Simulator:
(click to enlarge)

Klarna Sandbox

Alternatively, you can also activate the Klarna Sandbox. The activation in this case is the same, as on the Live-System. The difference however is, that you need a Sanbox Account on Klarna Developers. After you have created the account and the Sandbox-credentials, simply continue, as if you were activating your live account, as described in the next section.
On the Test-Environment, the environment slider does nothing for the Klarna Sandbox.

Activation on the Live-System

Similar to the Klarna Simulator, it also requires the same level of configuration, like the countries, with the difference, that the user and password accept your real Klarna credentials. Enter your user and password and configure your countries.
Additionally, you also have the Test|Live slider, which does different things, depending on which Saferpay Environment you are currently on:
On the Saferpay Production-Environment, thie environment slider will switch between the Klarna Production and Sandbox. See the this section on why this is necessary!
(click to enlarge)
Make sure, that these countries are also available in your Klarna-Contract, otherwise Klarna may reject the processing!
Once you have entered your credentials, configured your country and, if necessary, the environment enpoint, click on Save. Lastly, make sure to activate Klarna, by clicking on the activation slider.
(click to enlarge)
This is Klarna (Sandbox) on the Payment Page:
(click to enlarge)

Integration

Klarna is only available via the Saferpay PaymentPage and requires the following to work properly:
  • SpecVersion 1.19 and up!
Additionally, it requires certain datapoints to be submitted, in order for the processing to work.
Please also refer to the Payment Page Initialize request-specification for more detailed information!
Parameter
Description
Payer.BillingAddress.CountryCode
The country your customer resides in. Make sure, that this country is activated in your Klarna settings (see above) and it matches the Payment.Amount or otherwise Klarna will not be displayed, as an option!
Order.Items[].Type
Type of the Order Item.
Order.Items[].Quantity
Number of this specific item, sold to the customer.
Order.Items[].Name
Name of the product, defined by the merchant.
Order.Items[].UnitPrice
Single unit price of this specific item. Is 0, when Order.Items[].Type is "Discount"!
Make sure, that all the order cart items are included (including shipping fee) and that all the unit-prices and quantities add up with the total amount set in Payment.Amount.Value (and, if set, TaxRate/TaxAmount). Otherwise Klarna may reject the payment. Additionally, make also sure, that Payment.Amount.CurrencyCode also is in-line with Payer.BillingAddress.CountryCode! Missing even one of the mandatory parameters, or sending a missmatching CurrencyCode and CountryCode, will result in Klarna not being displayed!
Furthermore, for merchants in the European Union, Klarna highly recommends to also set the following parameters:
Parameter
Description
Order.Items[].TaxRate
Tax rate, applied to this order-item, depending on the country.
Order.Items[].TaxAmount
Tax amount for the whole order-item.

Example

1
"Payer": {
2
"BillingAddress": {
3
"FirstName": "John",
4
"LastName": "Doe",
5
"Email": "[email protected]",
6
"CountryCode": "de"
7
}
8
},
9
"Order": {
10
"Items": [
11
{
12
"Type": "DIGITAL",
13
"Id": 12345,
14
"VariantId": 54321,
15
"Name": "Test Product",
16
"CategoryName": "Test Category",
17
"Description": "Test 123",
18
"Quantity": 1,
19
"UnitPrice": 245,
20
"IsPreOrder": false,
21
"TaxRate": 1900,
22
"TaxAmount": 123,
23
"DiscountAmount": 0
24
}
25
]
26
},
Copied!

Address

Klarna requires the Billing Address to be set. There are two options you have, on how this is done.
1 - The address is captured during the payment process, where the customer has to enter it him/herself:
(click to enlarge)
2 - If you already have the address stored in your shop, you can also submit it, with the Payment Page Initialize Request, inside the Payer.BillingAddress container. In this case the address-form will be skipped.

Example

1
"Payer": {
2
"BillingAddress": {
3
"FirstName": "John",
4
"LastName": "Doe",
5
"Email": "[email protected]",
6
"CountryCode": "de",
7
"Gender": "MALE",
8
"Street": "Fakestreet 1",
9
"Zip":"12345",
10
"City":"Notown",
11
"DateOfBirth": "1990-03-17",
12
"Phone": "+491234659870"
13
}
14
},
Copied!

Attachment Data

Klarna offers the option, to send additional data-points, alongside each order. These data-points are then used for additional analysis, like a risk-check on Klarna side.
You can submit these data-points through the PaymentMethodOptions.Klarna.Attachment container, by defining the ContentType and the actual Body. As of now, these data-points are submitted as a JSON-string, following the format, as defined in the Klarna documentation.

Testing period

Before you can accept live payments, Klarna requires a testing period. During this period, Klarna will evaluate your business and integration, before they fully activate your account. During this time, the Environment Slider inside the Klarna configuration under Settings > Terminals inside the Saferpay Backoffice, has to be turned to Testing.
(click to enlarge)
On the live environment, always enter your live Klarna credentials, though these testing-transactions are running on the Klarna Sandbox!

Testing

Please refer to this chapter, if you want to test Klarna Payments.
Last modified 2mo ago