nopCommerce plugins

Klarna Checkout plugin for nopCommerce

alt text

A fully featured Klarna Checkout (https://www.klarna.com/uk/business/products/checkout/) plugin for nopCommerce.

Use as a widget anywhere (checkout directly on cart page), or as a standard payment method.

We are official Klarna partner.

Get it here: https://www.majako.net/nopcommerce-klarna-checkout-payment-v3

Supported markets

Klarna Checkout is only supported, for new merchants, in these markets: Austria, Germany, Finland, Netherlands, Norway, and Sweden.

Getting started

Set up for testing

Sign up for a European Klarna test account according to the instructions here: https://docs.klarna.com/resources/test-environment/

In the plugin settings, make sure "Test mode" is checked:

alt text

Set up for production

Create a European Klarna business account.

Make sure that "Klarna Checkout" solution is selected when signing up:

alt text

In the plugin settings, make sure "Test mode" is unchecked:

alt text


Make sure to restart the application after save, to make sure the changes are applied.

License key

Enter the license key you've got when purchasing the product (or trial) and click the "Get license" button. Make sure that you've entered the store domain name without https://www and ending slash etc, e.g. domain.com will work for both domain.com and www.domain.com.

The license key should be provided in the order confirmation email. If you haven't received one, contact us at support@majako.se.

Username and Password

Enter the api credentials created in the Klarna portal under Settings > Api credentials.

Test portal: https://playground.eu.portal.klarna.com/ Live portal: https://eu.portal.klarna.com/

Test mode

Make sure that this setting is checked, when running against Klarnas playground environment. Make sure it is unchecked when running against Klarnas live environment.

US Environment

OBSOLETE! Since Klarna doesn't support "Klarna Checkout" in their US environment. Should always be unchecked.

Debug mode

Enable verbose logging to the nopCommerce log.

Developer environment

Run the plugin in a developer environment that isn't publicly accessible, e.g. localhost. This will disable the callbacks from Klarna.

Default country

Enter the three letter ISO code for the default country for scenarios where the customer's country could not be determined.

Fallback to default country

If the current customer's country is not supported by Klarna payment method in nopCommerce, check this setting to use the configured default country.

Load countries in Checkout

Check this setting if you want Klarna Checkout to display a country selector. Otherwise the country determined by the plugin will be used.

Automatically activate Klarna Order

Check if orders automatically should be activated in Klarna's back office when a shipment is marked as shipped in nopCommerce.

Manage Klarna Orders from Admin

Check if order changes from nopCommerce admin should be synced to Klarna's back office. NOTE: requires the add-on license "Order management"

"Hidden" settings

There are a few "hidden" settings that are not so commonly used. To apply them, go to /Admin/Setting/AllSettings and add a new setting.

KlarnaCheckoutSettings.ForceFallbackToDefaultCountry (Value: True/False) Forces the plugin to use the fallback country without trying to determine the customer's actual country.

KlarnaCheckoutSettings.AllowSeparateShippingAddress (Value: True/False) Make Klarna Checkout show a separate form for shipping address.

Payment method restrictions

Go to Configuration > Payment method restrictions in the nopCommerce admin menu and make sure that the countries that should support Klarna Checkout in your store is unchecked here.


Find out what's failing

Debug mode. Check this plugin setting to enable verbose logging to the nopCommerce log. Klarna api log. In the Klarna Portal under "Logs" in the menu, you can inspect requests and responses.

Klarna responds with "Unauthorized"

Invalid license key

Enable debug mode and check the full message of the logged error in nopCommerce.

Invalid License for current host x.com. Licensed host is y.com.

Make sure you have entered the correct url when you made the purchase. Otherwise, contact support@majako.se to get help with changing it.

Country not supported

Make sure that the customer's country is supported in your Klarna account.

Either you can contact Klarna to add the country to your account.

Or you can make sure that only Klarna supported countries are unchecked in its column under Payment method restrictions (in nopCommerce admin). In the plugin settings, you can also set a "Default country" + check the "Fallback to default country" and/or check "Load countries in Checkout"

Currency not supported

Make sure that all of the store's currencies are supported in your Klarna account.

Either you can contact Klarna to add the currency to your account.

Or you can remove unsupported currencies from your store.

Bad value: options.allowed_customer_types (size must be between 1 and 2)

Make sure that one (or both) of the settings "B2C support" and "B2B support" are checked.


What is "Installation and configuration"?

When you are buying the plugin, you can choose to also buy the add-on "Installation and configuration".

alt text

When you buy this add-on Majako will help you to install the plugin and setup the basic configuration needed to get it up and running.

What you still need to do: 1. Create a European Klarna account with the Klarna Checkout feature enabled 2. Create a temporary administrator account in your nopCommerce installation for Majako 3. Contact Majako (support@majako.se) with basic information for your installation

What is the "Order management" add-on?

When you are buying the plugin, you can choose to also buy the add-on "Order management".

alt text

With this add-on and the setting "Manage Klarna Orders from Admin" checked, all changes of an order in nopCommerce will be reflected to Klarna, for instance adding or changing order items or changing shipping address.

What is synced without the "Order management" add-on?

  • New orders will also be created in Klarna
  • Cancelling an order in nopCommerce will result in cancelled order in Klarna as well (if possible)
  • If the setting "Automatically activate Klarna Order" is checked the Klarna orders will be activated when marking a shipment as shipped in nopCommerce

How does the plugin determine customer's country?

The plugin tries to determine the customer's country in this order:

  1. If KlarnaCheckoutSettings.ForceFallbackToDefaultCountry is configured - use that country
  2. Otherwise, use the customer's nopCommerce shipping address
  3. Otherwise, use the customer's nopCommerce generic attribute "CountryId"
  4. Otherwise, use nopCommerce's built in functionality for determine country based on ip address (GEO-IP)

If the above determined country isn't support for Klarna in the Payment method restrictions and if the setting "Fallback to default country" is enabled, use the country from the setting "Default country".

What is a Trial license?

A trial license is free. It can only be used with Klarna test accounts (https://playground.eu.portal.klarna.com/developer-sign-up)

What is a Multiple Domain license?

Multiple domain licenses can be used for more than one store on the same nopCommerce installation.

© Majako. 2022, All rights reserved