Search

Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

Klarna Drop-in integration

Add Klarna to an existing iOS Drop-in integration.

Our iOS Drop-in renders Klarna in your payment form, and redirects the shopper to Klarna to complete the payment. When making a Klarna payment, you additionally need to:

  1. Collect shopper details, and specify these in your payment request. Klarna uses this information for risk checks.
  2. Provide information about the purchased items by specifying lineItems in your payment request.
  3. Handle the redirect result after the shopper returns to your website.
  4. Capture the payment after the goods have been sent. This triggers the payment instructions to be sent to the shopper.

Before you begin

This page explains how to add Klarna to your existing iOS Drop-in integration. The iOS Drop-in integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Drop-in integration guide.

Before starting your Klarna integration:

  1. Make sure that you have set up your back end implementation, and added Drop-in to your payment form.
  2. Add Klarna in your test Customer Area.

Show Klarna in your payment form

Drop-in uses the countryCode and the amount.currency from your /paymentMethods request to show the available payment methods to your shopper.

To have Drop-in render Klarna in your payment form, specify in your request one of the following combinations of countryCode and amount.currency, depending on which Klarna payment method you want to accept:

Country countryCode amount.currency Pay now Pay later Slice it
Austria AT EUR -white_check_mark- -white_check_mark- -white_check_mark-
Denmark DK DKK -x- -white_check_mark- -white_check_mark-
Finland FI EUR -x- -white_check_mark- -white_check_mark-
Germany DE EUR -white_check_mark- -white_check_mark- -white_check_mark-
Norway NO NOK -x- -white_check_mark- -white_check_mark-
Sweden SE SEK -white_check_mark- -white_check_mark- -white_check_mark-
Switzerland CH CHF -x- -white_check_mark- -white_check_mark-
The Netherlands NL EUR -white_check_mark- -white_check_mark- -x-
United Kingdom GB GBP -x- -white_check_mark- -white_check_mark-
United States US USD -x- -white_check_mark- -white_check_mark-

Make a payment

When the shopper proceeds to pay, Drop-in invokes the didSubmit method which contains data.paymentMethod.

  1. Pass data.paymentMethod to your server.
  2. From your server, make a /payments request, specifying:

    • paymentMethod: The data.paymentMethod from the didSubmit event from your client app.
    • shopperLocale: A combination of language code and country code to specify the language used in your checkout. 
    • countryCode: The shopper's country. For a list of supported langauges, refer to Localization.

      Klarna will only approve the payment if the countryCode matches the currency
      and billingAddress provided in the request.

    • shopperEmail: The shopper's email address. This is where Klarna will send the payment instructions.
    • shopperReference: A unique reference to identify the shopper. 
    • returnUrl: The URL that the shopper is redirected to after they complete the payment.
    • lineItems: Price and product information about the purchased items. 

      Klarna will only approve the payment if the total amount specified in lineItems matches the amount.value.

    • shopperName (optional): The shopper's full name and gender, if specified.
    • billingAddress (optional):  The postal address of the shopper. 

      For improved shopper experience and conversion rates, we strongly recommend that you
      provide the shopperName and billingAddress.

    • additionalData.openinvoicedata.merchantData (optional): For some products or business models, Klarna might require additional information. If you need to send in this information, specify here the Base64 encoded JSON of the attachement.body value described in Klarna's documentation. ]
    curl https://checkout-test.adyen.com/v52/payments \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
       "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
       "reference":"YOUR_ORDER_REFERENCE",
       "paymentMethod":{
          "type":"klarna"
       },
       "amount":{
          "currency":"SEK",
          "value": 1000
       },
       "shopperLocale":"en_US",
       "countryCode":"SE",
       "shopperEmail":"youremail@email.com",
       "shopperName":{
          "firstName":"Testperson-se",
          "gender":"UNKNOWN",
          "lastName":"Approved"
       },
       "shopperReference":"YOUR_UNIQUE_SHOPPER_ID",
       "billingAddress":{
          "city":"Ankeborg",
          "country":"SE",
          "houseNumberOrName":"1",
          "postalCode":"12345",
          "street":"Stargatan"
       },
       "returnUrl":"my-app://",
       "lineItems":[
          {
             "quantity":"1",
             "amountExcludingTax":"331",
             "taxPercentage":"2100",
             "description":"Shoes",
             "id":"Item #1",
             "taxAmount":"69",
             "amountIncludingTax":"400"
          },
          {
             "quantity":"2",
             "amountExcludingTax":"248",
             "taxPercentage":"2100",
             "description":"Socks",
             "id":"Item #2",
             "taxAmount":"52",
             "amountIncludingTax":"300"
          }
       ],
       "additionalData" : {
         "openinvoicedata.merchantData" : "eyJjdXN0b21lcl9hY ... "
       }
    }
    # Set your X-API-KEY with the API key from the Customer Area.
    adyen = Adyen::Client.new
    adyen.env = :test
    adyen.api_key = "YOUR_X-API-KEY"
    
    response = adyen.checkout.payments({
      :merchantAccount => "YOUR_MERCHANT_ACCOUNT",
      :reference => "YOUR_ORDER_NUMBER",
      :paymentMethod => {
        :type => "klarna"
      },
      :amount => {
        :currency => "SEK",
        :value => 1000
      },
      :shopperLocale => "en_US",
      :countryCode => "SE",
      :shopperEmail => "youremail@email.com",
      :shopperName => {
        :firstName => "Testperson-se",
        :gender => "UNKNOWN",
        :lastName => "Approved"
      },
      :shopperReference => "YOUR_UNIQUE_SHOPPER_ID",
      :billingAddress => {
        :city => "Ankeborg",
        :country => "SE",
        :houseNumberOrName => "1",
        :postalCode => "12345",
        :street => "Stargatan"
      },
      :returnUrl => "my-app://",
      :lineItems => [
        {
          :quantity => "1",
          :amountExcludingTax => "331",
          :taxPercentage => "2100",
          :description => "Shoes",
          :id => "Item #1",
          :taxAmount => "69",
          :amountIncludingTax => "400"
        },
        {
          :quantity => "2",
          :amountExcludingTax => "248",
          :taxPercentage => "2100",
          :description => "Socks",
          :id => "Item #2",
          :taxAmount => "52",
          :amountIncludingTax => "300"
        }
      ],
      :additionalData => {
        :openinvoicedata.merchantData => "eyJjdXN0b21lcl9hY ... "
      }
    })
    // Create a Client to establish a connection to our services with your API Key from the Customer Area.
    Client client = new Client("YOUR_API_KEY", Environment.TEST);
    
    Checkout checkout = new Checkout(client);
    
    PaymentsRequest paymentsRequest = new PaymentsRequest();
    
    paymentsRequest.setMerchantAccount("YOUR_MERCHANT_ACCOUNT");
    paymentsRequest.setReference("YOUR_ORDER_REFERENCE");
    
    PaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails();
    paymentMethodDetails.setType("klarna");
    
    paymentsRequest.setPaymentMethod(paymentMethodDetails);
    
    Amount amount = new Amount();
    amount.setCurrency("SEK");
    amount.setValue(1000L);
    
    paymentsRequest.setAmount(amount);
    paymentsRequest.setShopperLocale("en_US");
    paymentsRequest.setCountryCode("SE");
    paymentsRequest.setShopperEmail("youremail@email.com");
    
    Name shopperDetails = new Name();
    shopperDetails.setFirstName("TestPerson-Se");
    shopperDetails.setGender(Name.GenderEnum.UNKNOWN);
    shopperDetails.setLastName("Approved");
    
    paymentsRequest.setShopperName(shopperDetails);
    paymentsRequest.setShopperReference("YOUR_UNIQUE_SHOPPER_ID");
    
    Address billingAddress = new Address();
    billingAddress.setCity("Ankeborg");
    billingAddress.setCountry("SE");
    billingAddress.setHouseNumberOrName("1");
    billingAddress.setPostalCode("12345");
    billingAddress.setStreet("Stargatan");
    
    paymentsRequest.setBillingAddress(billingAddress);
    paymentsRequest.setReturnUrl("my-app://");
    
    List<LineItem> lineItems = new ArrayList<>();
    lineItems.add(
            new LineItem()
                    .quantity(1L)
                    .amountExcludingTax(331L)
                    .taxPercentage(2100L)
                    .description("Shoes")
                    .id("Item #1")
                    .taxAmount(69L)
                    .amountIncludingTax(400L)
    );
    lineItems.add(
            new LineItem()
                    .quantity(2L)
                    .amountExcludingTax(248L)
                    .taxPercentage(2100L)
                    .description("Socks")
                    .id("Item #2")
                    .taxAmount(52L)
                    .amountIncludingTax(300L)
    );
    
    paymentsRequest.setLineItems(lineItems);
    
    Map<String, String> additionalData = new HashMap<>();
    additionalData.put("openinvoicedata.merchantData", "eyJjdXN0b21lcl9hY ...");
    
    paymentsRequest.setAdditionalData(additionalData);
    
    PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
    // Set your X-API-KEY with the API key from the Customer Area.
    $client = new \Adyen\Client();
    $client->setXApiKey("YOUR_X-API-KEY");
    $service = new \Adyen\Service\Checkout($client);
    
    $params = [
      "merchantAccount" => "YOUR_MERCHANT_ACCOUNT",
      "reference" => "YOUR_ORDER_REFERENCE",
      "paymentMethod" => [
         "type" => "klarna"
      ],
      "amount" => [
         "currency" => "SEK",
         "value" => "1000"
      ],
      "shopperLocale" => "en_US",
      "countryCode" => "SE",
      "shopperEmail" => "youremail@email.com",
      "shopperName" => [
         "firstName" => "Testperson-se",
         "gender" => "UNKNOWN",
         "lastName" => "Approved"
      ],
      "shopperReference" => "YOUR_UNIQUE_SHOPPER_ID",
      "billingAddress" => [
         "city" => "Ankeborg",
         "country" => "SE",
         "houseNumberOrName" => "1",
         "postalCode" => "12345",
         "street" => "Stargatan"
      ],
      "returnUrl" => "my-app://",
      "lineItems" => [
         [
            "quantity" => "1",
            "amountExcludingTax" => "331",
            "taxPercentage" => "2100",
            "description" => "Shoes",
            "id" => "Item #1",
            "taxAmount" => "69",
            "amountIncludingTax" => "400"
         ],
         [
            "quantity" => "2",
            "amountExcludingTax" => "248",
            "taxPercentage" => "2100",
            "description" => "Socks",
            "id" => "Item #2",
            "taxAmount" => "52",
            "amountIncludingTax" => "300"
         ]
      ],
      "additionalData" => [
        "openinvoicedata.merchantData" => "eyJjdXN0b21lcl9hY ... "
      ]
    ];
    
    $result = $service->payments($params);
    
    // Check if further action is needed
    if (array_key_exists("action", $result){
       // Pass the action object to your frontend.
       // $result["action"]
    }
    else {
       // No further action needed, pass the resultCode to your front end
       // $result['resultCode']
    }
    # Set your X-API-KEY with the API key from the Customer Area.
    adyen = Adyen.Adyen()
    adyen.client.xapikey = 'YOUR_X-API-KEY'
    
    result = adyen.checkout.payments({
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "reference": "YOUR_ORDER_REFERENCE",
      "paymentMethod": {
        "type": "klarna"
      },
      "amount": {
        "currency": "SEK",
        "value": "1000"
      },
      "shopperLocale": "en_US",
      "countryCode": "SE",
      "shopperEmail": "youremail@email.com",
      "shopperName": {
        "firstName": "Testperson-se",
        "gender": "UNKNOWN",
        "lastName": "Approved"
      },
      "shopperReference": "YOUR_UNIQUE_SHOPPER_ID",
      "billingAddress": {
        "city": "Ankeborg",
        "country": "SE",
        "houseNumberOrName": "1",
        "postalCode": "12345",
        "street": "Stargatan"
      },
      "returnUrl": "my-app://",
      "lineItems": [
        {
          "quantity": "1",
          "amountExcludingTax": "331",
          "taxPercentage": "2100",
          "description": "Shoes",
          "id": "Item #1",
          "taxAmount": "69",
          "amountIncludingTax": "400"
        },
        {
          "quantity": "2",
          "amountExcludingTax": "248",
          "taxPercentage": "2100",
          "description": "Socks",
          "id": "Item #2",
          "taxAmount": "52",
          "amountIncludingTax": "300"
        }
      ],
      "additionalData": {
        "openinvoicedata.merchantData": "eyJjdXN0b21lcl9hY ... "
      }
    })
    // Set your X-API-KEY with the API key from the Customer Area.
    var client = new Client ("YOUR_X-API-KEY", Environment.Test);
    var checkout = new Checkout(client);
    
    var paymentRequest = new Adyen.Model.Checkout.PaymentRequest
    {
       MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
       Reference = "YOUR_ORDER_REFERENCE",
       PaymentMethod = new DefaultPaymentMethodDetails { Type = "klarna" },
       Amount = new Model.Checkout.Amount(Currency: "SEK", Value: 1000),
       ShopperLocale = "en_US",
       CountryCode = "SE",
       ShopperEmail = "youremail@email.com",
       ShopperName = new Model.Checkout.Name
       {
           FirstName = "Testperson-se",
           Gender = Model.Checkout.Name.GenderEnum.UNKNOWN,
           LastName = "Approved"
       },
       ShopperReference = "YOUR_UNIQUE_SHOPPER_ID",
       BillingAddress = new Model.Checkout.Address
       {
           City = "Ankeborg",
           Country = "SE",
           HouseNumberOrName = "1",
           PostalCode = "12345",
           Street = "Stargatan"
       },
       ReturnUrl = "my-app://",
       LineItems = new List<LineItem>
    {
       new LineItem(Quantity:1, AmountExcludingTax:331, TaxPercentage:2100,
       Description:"Shoes",Id:"Item #1", TaxAmount:69, AmountIncludingTax:400),
         new LineItem(Quantity:2, AmountExcludingTax:248, TaxPercentage:2100,
       Description:"Shoes",Id:"Item #2", TaxAmount:52, AmountIncludingTax:300),
    },
       AdditionalData = new Dictionary<string, string> { { "openinvoicedata.merchantData", "eyJjdXN0b21lcl9hY ... " } }
    };
    return paymentRequest;
    }
    // Set your X-API-KEY with the API key from the Customer Area.
    const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
    const config = new Config();
    // Set your X-API-KEY with the API key from the Customer Area.
    config.apiKey = '[API_KEY]';
    config.merchantAccount = '[MERCHANT_ACCOUNT]';
    const client = new Client({ config });
    client.setEnvironment("TEST");
    const checkout = new CheckoutAPI(client);
    checkout.payments({
      merchantAccount: "YOUR_MERCHANT_ACCOUNT",
      reference: "YOUR_ORDER_REFERENCE",
      paymentMethod: {
         type: "klarna"
      },
      amount: {
         currency: "SEK",
         value: "1000"
      },
      shopperLocale: "en_US",
      countryCode: "SE",
      shopperEmail: "youremail@email.com",
      shopperName: {
         firstName: "Testperson-se",
         gender: "UNKNOWN",
         lastName: "Approved"
      },
      shopperReference: "YOUR_UNIQUE_SHOPPER_ID",
      billingAddress: {
         city: "Ankeborg",
         country: "SE",
         houseNumberOrName: "1",
         postalCode: "12345",
         street: "Stargatan"
      },
      returnUrl: "my-app://",
      lineItems: [
         {
            quantity: "1",
            amountExcludingTax: "331",
            taxPercentage: "2100",
            description: "Shoes",
            id: "Item 1",
            taxAmount: "69",
            amountIncludingTax: "400"
         },
         {
            quantity: "2",
            amountExcludingTax: "248",
            taxPercentage: "2100",
            description: "Socks",
            id: "Item 2",
            taxAmount: "52",
            amountIncludingTax: "300"
         }
      ],
      additionalData: {
        "openinvoicedata.merchantData": "eyJjdXN0b21lcl9hY ... "
      }
    }).then(res => res);

    The /payments response includes:

    • action: Object containing information about the redirect.
    /payments response
    {
      "resultCode": "RedirectShopper",
       "action": {
         "method": "GET",
         "paymentData": "Ab02b4c0!BQABAgCSZT7t...",
         "paymentMethodType": "klarna",
         "type": "redirect",
         "url": "https://test.adyen.com/hpp/redirect.shtml?brandCode=.."
    },
      "details": [
        {
            "key": "redirectResult",
            "type": "text"
        }
      ],
    ...
    }
  3. Pass the action object to your client app.

Handle the redirect result

Drop-in uses dropInComponent.handle(action) to redirect the shopper to Klarna.  

  1. To inform Drop-in when the shopper returns to your app, implement the following in your UIApplicationDelegate:
    func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey: Any] = [:]) -> Bool {
       RedirectComponent.applicationDidOpen(from: url)
    
       return true
    }
    After Drop-in completes the action, it invokes the didProvide method.
  2. From your server, make a POST /payments/details request providing the data from the didProvide method from your client app.
    /payments/details request
    {
       "{hint:data.paymentData from didProvide}paymentData{/hint}":"Ab02b4c0!BQABAgCJN1wRZuGJmq8dMncmypvknj9s7l5Tj...",
       "{hint:data.details from didProvide}details{/hint}":{
         "redirectResult":"Ab02b4c0!BQABAgCW5sxB4e/=="
       }
    }
    You receive a response containing:
    • resultCode: Use this to present the result to your shopper.
    • pspReference: Our unique identifier for the transaction.
    /payments/details response
    {
       "resultCode": "Authorised",
       "pspReference": "88154795347618C"
    }
For more information and detailed instructions, refer to Handling the redirect result.

Present the payment result

Use the resultCode from the /payments/details response to present the payment result to your shopper. The resultCode values you can receive for Klarna are:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment was successful. After the goods have been sent, you also need to capture the payment.
Cancelled The shopper cancelled the payment. Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.
Refused The payment was refused by Klarna, as it didn't pass their risk checks. Ask the shopper to try the payment again using a different payment method.
Pending Only when processing in the Unites States: Klarna has not confirmed the final status of the payment yet, for example because of suspected fraud. If the payment is not authorised within 24 hours, it is automatically cancelled. See note 1 Inform the shopper that you've received their order, and are waiting for the payment to be completed.
To know the final result of the payment, wait for the AUTHORISATION notification.

When a payment is refused by Klarna, the shopper sees the following message:


1 If you'd like pending Klarna payments to be cancelled immediately, contact our Support Team. If you have set pending Klarna payments to be cancelled immediately, you will receive for such payments a notification with:

  • eventCode: AUTHORISATION
  • success: false

Capture the payment

All Klarna payments have to be manually captured within 28 days after authorisation, even if you have enabled automatic capture on your merchant account.

If you can guarantee that the goods are shipped within 24 hours of capturing the payment, our Support Team can also set up automatic capture for Klarna payments.

Partial captures

To partially capture a Klarna payment, specify in your call to the /capture  endpoint:

  • modificationAmount: The amount that the shopper should pay. 
  • additionalData.openinvoicedata: Price and product information for the items that the shopper should pay for, to be included on the invoice. For the partial capture to be successful, the amounts stated in openinvoicedata need to be correct. For more information, refer to Invoice lines.
Our Support Team can also set up multiple partial captures for Klarna payments. Multiple partial captures will create a new invoice for each capture. 
{
   "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
   "modificationAmount":{
      "currency":"SEK",
      "value":"400"
   },
   "originalReference":"8825408195409505",
   "additionalData":{
      "openinvoicedata.numberOfLines":"1",
      "openinvoicedata.line1.currencyCode":"SEK",
      "openinvoicedata.line1.description":"Shoes",
      "openinvoicedata.line1.itemAmount":"331",
      "openinvoicedata.line1.itemVatPercentage":"2100",
      "openinvoicedata.line1.numberOfItems":"1"
   }
}

You will receive a /capture response containing a pspReference associated with this request. Once we have processed your request, you will also receive a CAPTURE notification. For more information, refer to Capture.

Recurring payments

To make recurring Klarna payments you need to:

  1. Create a shopper token.
  2. Use the token to make future payments for the shopper.
Not all Klarna payment methods or countries support recurring payments. For information about the availability of recurring payments, refer to Klarna documentation.

Create a token

To create a token, include in your /payments request:

  • storePaymentMethod: true
  • shopperReference: Your unique identifier for the shopper.

When the payment has been settled, you receive a notification webhook containing:

  • eventCode: RECURRING_CONTRACT
  • originalReference: The pspReference of the initial payment.
  • pspReference: This is the token that you need to make recurring payments for this shopper.

RECURRING_CONTRACT notification
  {
     "live":"false",
     "notificationItems":[
        {
           "NotificationRequestItem":{
              "additionalData":{
                 "shopperEmail":"youremail@email.com",
                 "shopperReference":"YOUR_UNIQUE_SHOPPER_ID"
              },
              "amount":{
                 "currency":"SEK",
                 "value":1000
              },
              "eventCode":"RECURRING_CONTRACT",
              "eventDate":"2019-11-27T16:41:42+01:00",
              "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
              "merchantReference":"TestRef",
              "originalReference":"8515748691833061",
              "paymentMethod":"klarna_paynow",
              "{hint:The token for making recurring payments}pspReference{/hint}":"8315748692943051",
              "reason":"",
              "success":"true"
           }
        }
     ]
  }

Make a payment with a token

To make a payment with the token, include in your /payments request:

  • shopperReference: The unique shopper identifier that you specified when creating the token.
  • paymentMethod.storedPaymentMethodId: The pspReference from the RECURRING_CONTRACT notification. You can also get this value by using the /listRecurringDetails endpoint.
  • shopperInteractionContAuth.
  • recurringProcessingModel: The type of recurring payment that you want to make. Possible values:
recurringProcessingModel Description
CardOnFile Online purchase where shopper is actively making a purchase using their previously stored payment details.
Subscription A series of transactions with fixed or variable amounts, following a fixed time interval. This is the default value for payment requests where shopperInteractionContAuth.
UnscheduledCardOnFile Contracts that occur on a non-fixed schedule using stored payment details. For example, automatic top-ups when cardholder's balance drops below certain amount.
When making a recurring payment, you also need to provide all the parameters required for a Klarna payment request.

A sample request for Klarna — Pay now, when the shopper is actively making a purchase using previously stored payment details:

/payments request
  {
    "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
    "reference":"YOUR_ORDER_REFERENCE",
    "paymentMethod":{
       "type":"klarna_paynow",
       "{hint:The pspReference from the RECURRING_CONTRACT notification}storedPaymentMethodId{/hint}":"8315748692943051"
    },
    "{hint:The shopperReference that you specified when creating the token}shopperReference{/hint}":"YOUR_UNIQUE_SHOPPER_ID",
    "amount":{
       "currency":"SEK",
       "value":"1000"
    },
    "shopperInteraction":"ContAuth",
    "recurringProcessingModel": "CardOnFile",
    "shopperLocale":"en_US",
    "countryCode":"SE",
    "shopperEmail":"youremail@email.com",
    "shopperName":{
       "firstName":"Testperson-se",
       "gender":"UNKNOWN",
       "lastName":"Approved"
    },
    "billingAddress":{
       "city":"Ankeborg",
       "country":"SE",
       "houseNumberOrName":"1",
       "postalCode":"12345",
       "street":"Stargatan"
    },
    "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy..",
    "lineItems":[
       {
          "quantity":"1",
          "amountExcludingTax":"331",
          "taxPercentage":"2100",
          "description":"Shoes",
          "id":"Item #1",
          "taxAmount":"69",
          "amountIncludingTax":"400",
          "taxCategory":"High"
       },
       {
          "quantity":"2",
          "amountExcludingTax":"248",
          "taxPercentage":"2100",
          "description":"Socks",
          "id":"Item #2",
          "taxAmount":"52",
          "amountIncludingTax":"300",
          "taxCategory":"High"
       }
    ]
  }

Test and go live

Before accepting live Klarna payments, test your integration using the test details provided in the Klarna documentation

Before you go live:

Make sure that:

  • You consider Klarna's legal and privacy information.
  • You follow the Klarna guidelines on how to display Klarna in your checkout.
  • The invoice lines and VAT are displayed correctly on Klarna's pages.
  • If a shopper gets rejected by Klarna, you offer them another payment method.
  • You pass the shopper's name and address in your payment request. While optional, providing these parameters improves the shopper experience and increases conversion rates.

Testing in live environment

If you are going to test Klarna payments once you are in the live environment, make sure that you:

  • Provide real shopper data. For example, your real name, personal email, personal mobile, and home and billing address. Don't provide a company address as billing address.
  • Choose an item with a reasonable amount that meets Klarna's minimum requirements. For example, for Slice it, Klarna requires a minimum amount of 35 GBP. Klarna can reject a request if the product is too expensive and they do not have enough transaction history for the shopper.
  • Don't perform multiple tests in a short span of time from the same device or IP address. This will trigger velocity rule checks, which will lead to the transaction being rejected.

If the conditions above are not met, you might receive a resultCode of Refused . The shopper sees a page with an "Option Not Available" message instead of the Klarna Payments widget. Note that these checks are bypassed in test and are only applied in the live environment.

See also