Klarna Payments

Important: 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.

Important: 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!

This chapter details the technical implementation of Klarna Payments, through Saferpay.

Requirements

The following requirements have to be met, in order to accept Klarna Payments via Saferpay:

  • 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 worldline.sps@klarna.com
  • Klarna Payments is only available via the PaymentPage flow!
  • SpecVersion 1.19 and up!

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.

alt text

Klarna 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 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.

alt text

Once this is done, click on Save, however you also need to activate the Simulator, by clicking on the activation-slider: alt text

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:

alte text

Klarna

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.

Very Important: On the Saferpay Test Environment, the Klarna configuration exclusively works on the Klarna Sandbox! If you want to test on the Klarna Sandbox, you have to navigate to Klarna Developers to create your Sandbox account.

Additionally, you also have the Test|Live slider, which does different things, depending on which Saferpay Environment you are currently on:

  • Test: On the Saferpay Test Environment, this option will always point towards the Klarna Sandbox!
  • Production: On the Saferpay Production-Environment, this slider will switch between the Klarna Production and Sandbox. See the next sub-chapter on why this is necessary!

alt text

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.

alt text

This is the Klarna Sandbox on the Payment Page:

alt text

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. alt text

Important: On the live environment, always enter your live Klarna credentials, though these testing-transactions are running on the Klarna Sandbox!

Integration

Klarna requires certain datapoints to be submitted, in order for the processing to work. Most importantly, you must submit the order cart, via the Order.Items[] array. Here is a list of all the mandatory parameters, that need to be submitted:

Info: 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), 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"!

Important: Make sure, that all the order cart items are included and that all the unit-prices add up with the total amount set in Payment.Amount.Value. 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

  "Payer": {
    "BillingAddress": {
      "FirstName": "John",
      "LastName": "Doe",
      "Email": "john.doe@provider.com",
      "CountryCode": "de"
    }
  },
  "Order": {
    "Items": [
      {
        "Type": "DIGITAL",
        "Id": 12345,
        "VariantId": 54321,
        "Name": "Test Product",
        "CategoryName": "Test Category",
        "Description": "Test 123",
        "Quantity": 1,
        "UnitPrice": 245,
        "IsPreOrder": false,
        "TaxRate": 1900,
        "TaxAmount": 123,
        "DiscountAmount": 0
      }
    ]
  },

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: alt text
  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

"Payer": {
    "BillingAddress": {
        "FirstName": "John",
        "LastName": "Doe",
        "Email": "john.doe@provider.com",
        "CountryCode": "de",
        "Gender": "MALE",
        "Street": "Fakestreet 1",
        "Zip":"12345",
        "City":"Notown",
        "DateOfBirth": "1990-03-17",
        "Phone": "+491234659870"
    }
},
Back to Top