Setting Up Klarna

To offer your customers the benefit of paying with Klarna, you must first sign up for a Klarna account and gain access to the Klarna Merchant Portal. Then, complete the Klarna configuration from the Admin of your Magento store.

Important: Klarna does not support currency switches to display multiple currencies in one website. Magento uses a base currency and tax configured at the website level (not store view) to avoid rounding and mismatch issues. To support multiple currencies, create a website per currency, using different URLs configured at the Magento website level (not store view).

Klarna Merchant Portal Klarna Merchant Portal

Step 1: Set Up Your Klarna Account

  1. Do the following from the Admin of your Magento installation:

    • On the Admin sidebar, go to Stores > Settings > Configuration.
    • In the panel on the left under Sales, choose Payment Methods.
    • In the Klarna section, click Configure. Then under Klarna Payments, click the link to the Klarna Merchant Onboarding page.
  2. Do one of the following:

    • To create a new account, click Get Started. Then, complete the onboarding process to create an account. When you receive the confirmation email from Klarna, click Activate account to log in.
    • If you already have an account, click Log in in the upper-right corner.

      Create a Klarna Merchant Account Create a Klarna Merchant Account

  3. To generate your API Credentials for Klarna’s Playground environment, do one of the following:

    • On the Home page of your account under Preferences, click Settings.
    • In the upper-left corner of the page, click the Menu icon. Then in the left sidebar under Preferences, click Settings.

    Then, do the following:

    • On the API Credentials tab, click Generate new API credentials. Then when prompted, click Create credentials.
    • After your credentials are generated, click Download as .txt. Look in the area where your browser saves downloads and open the file. Keep the file open, and save it in a place where you can find it.
    • Select the checkbox to confirm that you have saved your credentials and click Close.

      Generate API Credentials Generate API Credentials

  4. Click the Menu icon in the upper-left corner. Then in the sidebar under Preferences, click Branding.

    In the box at the top of the page, copy your Merchant ID and paste it into the text file with your API credentials. You will need this information to complete the Magento configuration.

    Branding Branding

    You can return to your Klarna account later to complete the remaining settings.

Step 2: Configure Magento

  1. Open another browser tab, and log in to the Admin of your Magento store.

  2. On the Admin sidebar, choose Stores. Then under Settings, choose Configuration.

  3. In the upper-left corner, choose the Store View where the configuration applies. If your installation has only one view, accept the Default Config setting.

  4. In the panel on the left under Sales, choose Payment Methods. In the Klarna section, click Configure.

    Klarna Klarna

  5. Expand the Klarna API section. Then, do the following:

    • Set API Version to one of the following: Klarna Payments (Europe):
      Supported countries: AT / DE / DK / FI / NL / NO / SE / UK Klarna Payments (North America)
    • In the Merchant ID/EID field, enter the Merchant ID from your Klarna credentials.
    • In the Password/Shared secret field, enter the password from your Klarna API credentials.
    • To use the Klarna Playground for test transactions, set Test Mode to Yes.
    • To generate a record of interactions while testing the integration, set Debug Mode to Yes.

      Turn Debug Mode off before going live with Klarna in your production store.

      Klarna API Klarna API

  6. Expand the Klarna Payments section. then, do the following:

    • Set Enable this Solution to Yes.
    • Set Payment from applicable countries to one of the following:

      All Allowed Countries Customers from all countries specified in your store configuration can use this payment method.
      Specific Countries After choosing this option, the Payment from Specific Countries list appears. Hold down the Ctrl key and select each country in the list where customers can make purchases from your store.
    • If your Klarna account supports B2B payments, set Enable B2B to Yes.
    • If you want Klarna to prepare a set of personalized credit options for each customer, set Data sharing to Yes.

    • Set Data sharing on load to one of the following:

      No Customer billing and shipping address information is shared with Klarna after the transaction is authorized. If a shipping address error is encountered during authorization, the customer is instructed to return to the previous step and correct the problem.
      Yes Customer billing and shipping address information is shared with Klarna when the payment method is selected during the checkout process.
    • Enter a Sort Order number to determine the position of Klarna in the list of payment methods during checkout. (0 = first, 1 = second, 2 = third, and so on.)

      Klarna Payments Klarna Payments

  7. If you want to stop here, tap Save Config.

  8. When prompted, click the Cache Management link at the top of the page.  Then, refresh all invalid caches.

Step 3: Complete the Design Settings (Optional)

You can complete the Klarna Payment Design Settings now, or at a later time. You might use a color picker to experiment with different colors for each element to match your store’s theme. The results might vary, depending on theme.

Enter the hexadecimal value of the color that you want to use for the following elements.

  • Details color
  • Border color
  • Selected border color
  • Text color
  • Border radius

Klarna Payments Design Klarna Payments Design

When complete, click Save Config. Then when prompted, click the Cache Management link at the top of the page to refresh all invalid caches.