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 multiple ways of payment:

  • Pay Now: The order is paid now, via Direct Debit, Card, or Bank Transfer.

  • Pay in 30 days: The order is paid on invoice.

  • Pay in 3 or 4: The order is split into 3 or 4 payments, interest-free.

  • Financing: The order is paid in installment rates, with an interest.

  • B2B: Handle B2B invoices via Billie.

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:

  • A corresponding license and thus 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.

  • API Spec-Version 1.19+

Billie

Billie requires the following things to be met:

  • A valid contract with Klarna, which includes Billie.

  • Either the value "COMPANY" must be transmitted in the Payer.BillingAddress.Gender parameter or the payer must select the value "Company" in the field "Salutation" on the address form on the payment page.

Supported features

Feature

Support

Secure Card Data

Recurring Payments

3D Secure

Dynamic Currency Conversion (DCC)

Mail Phone Order

Omni-Channel

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.

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

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:

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!

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.

This is Klarna (Sandbox) on the Payment Page:

Integration

Klarna is only available via the Saferpay PaymentPage and requires the following to work properly:

  • SpecVersion 1.19 and up!

  • The notification URLs, inside theNotification conatiner are mandatory, in order to avoid missing payment successes. See the Payment Page process for further information.

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.

This includes Taxes.

Must be 0, if Type is "DISCOUNT". You instead then use Order.Items[].DiscountAmount. Must be negative, if Type is "GIFTCARD", to indicate a discount/voucher on the overall order.

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.

While the UnitPrice is the gross amount, you have to calculate the TaxAmount from the net amount.

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:

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"
    }
},

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.

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 updated