Klarna Docs - FAQ: Adobe Commerce ≥ 2.3.x

FAQ: Adobe Commerce ≥ 2.3.x

Find answers to the frequently asked questions about the Adobe Commerce integration with Klarna.

You can’t use both Klarna payments and Klarna checkout on the same website. You can use it in the same Adobe Commerce instance as long as you set up separate websites and if your Klarna contract allows you to use both products. To learn more,  contact your Klarna account manager or solutions engineer. If you don’t have a contract with Klarna yet, contact a Klarna sales representative.

We display the payment method name returned to us by the API. The payment method name is driven by Regional Product and Marketing. You can’t change it at the merchant level.

Adobe Commerce uses a base currency that is, along with tax settings, configured at the website level and not store view. To avoid rounding and mismatch issues, we only work with base currency and don’t support using display currency (which is used by the currency switcher). If you want to support multiple currencies, you need to set up multiple websites with different URLs, configured in Adobe Commerce at the website level, not store view, for each currency.

You can find this configuration in the following menus in the Admin:

  • Stores > Configuration > General > General > Country Options > Allow Countries
  • Stores > Configuration > Sales > Payment Methods > Klarna > Klarna Checkout > Shipping Countries

Bulk capture isn’t supported natively by Adobe Commerce. Because of this, many merchants build this functionality into Adobe Commerce custom. There is no standard way to implement bulk capture, so we have no way of building our code to support this. If Adobe Commerce ever releases support for this natively in the platform, we will add full support for it as well.

The below tax configuration is necessary for tax to be calculated and communicated properly between Adobe Commerce and Klarna.

To change the tax settings, go to Stores > Configuration > Sales > Tax, then change the settings applicable for your store:

General tax calculation

  • Tax Calculation Based On should be set to Shipping Address
  • Apply Customer Tax must be set to After Discount

Tax calculation for non-US countries 

  • Tax Calculation Method Based On should be set to Row Total
  • Catalog Prices must be set to Including Tax
  • Shipping Prices must be set to Including Tax 
  • Apply Discount on Prices must be set to Including Tax

Tax calculation for the US

  • Tax Calculation Method Based On should be set to Unit Price
  • Catalog Prices must be set to Excluding Tax
  • Shipping Prices must be set to Excluding Tax
  • Apply Discount on Prices must be set to Excluding Tax

Discounts are usually shared with Klarna as part of the appropriate order line item, not as an individual separate discount type order line item. 

However, there are exceptions, for example, when Klarna shipping assistant is active and the discount impacts shipping.

Starting from version 2.4.3, released August 2020, Klarna logs are accessible directly in the Adobe Commerce Admin. If you have the Klarna extension for Adobe Commerce installed in your shop, you can find Klarna API logs using the steps below. When requesting support from Klarna, please share the related logs files covering the timeframe of the issue. (To avoid sharing customer personal identifiable information, note the configuration setting under "API Configuration" for "Logging general information", which is recommended to be set to "Disable" for production.)

To get the Klarna API logs from the Admin:

  1. Login to the Dashboard/Admin panel.
  2. On the left side of the screen, click on the gear icon labeled SYSTEM.

3. In the Klarna section, click Logging.

4. From the list of displayed logs, in the Action column, click View next to the operation for which you want to see the logs. For sharing logs, e.g. for Klarna support, you can Export the logs to a file.

Each Klarna API request is also available in the Developer logs app in the Klarna merchant portal.

For Adobe Commerce versions earlier than 2.4.3, logs are stored on a merchant's server in the var/log folder within root Adobe Commerce installation.

Additionally, exception log files, for example, exceptions.log and klarna_api.log, are stored on the server under {shop base path}/var/log.

After changing any shop configuration settings that may impact the data related to the shop's Klarna integration, make sure to clear the shop's cache of stored data, under SYSTEM > Cache Management.

The Klarna extension (klarna-m2-klarna) is the recommended one. It includes both Klarna payments and Klarna checkout, as well as On-site messaging, Order management, and Express button.

While the Klarna checkout extension (klarna-m2-checkout) is still available on the Adobe Commerce Marketplace, it’s not updated with the latest functional changes. It’s still available for shops that already use this extension, but bug fixes and support are done only for the recommended klarna-m2-klarna extension.

Adobe Commerce has moved to the industry standard of using Composer to install packages. This is Adobe Commerce's preferred solution that is recommended to all third-party partners. As such Klarna only provides the install using this method. Using composer allows us to specify external requirements our modules rely on and have those installed automatically for the merchant,as opposed to the merchant having to do additional steps to install our modules.The zip file that is downloaded is only the meta-package for our extension and isn’t something Klarna has a way of turning off.The zip file is shown for all extensions regardless of if they are m1 or m2, however they are really more relevant for m1 extensions.

To use Klarna checkout just in one country, disable it at the default scope and enable it at the website scope for the market where you want to offer Klarna checkout.

You should perform all order management operations in Adobe Commerce. For changes done within the shop, updates are synced with Klarna data, but when doing updates in the Klarna merchant portal, there is no sync with the shop data.

If this is for a physical item being ordered, please make sure the customer is being presented with shipping options. If no shipping options are offered, Adobe Commerce will reject the order, causing the extension code to cancel the order. 

If you offer different shipping methods by region, please make sure you also offer a fallback shipping option that covers the entire country so that if a customer enters a shipping address for which the shop doesn’t have regional options, the customer will at least be presented with the fallback option.

Most often orders are canceled due to a shipping mismatch between the placed Klarna order and the shop order, but there could be other root causes. To determine the root cause, review the log files.

There are multiple reasons why the Klarna checkout iframe and redirects don’t work correctly:

  • The shop isn’t reachable from outside. Even for local development, your shop must be publicly accessible. Use a service such as https://ngrok.com.
  • The shop isn’t using an HTTPS address.
  • The store’s SSL certificate is self-signed. Self-signed certificates won’t work with the Klarna extension. Use a certificate authority, for example, Let's Encrypt, to get your store’s certificate signed.
  • The website is secured with a password.
  • If you’re allowlisting specific IP addresses, note that we use AWS, so you would need to allowlist all of AWS. We recommend that you don’t use IP allowlisting, instead allowing all traffic to any URL that contains /klarna/ or /kco/. If you really have to allowlist IPs, refer to Amazon's documentation on IP address ranges.

If you’re using Klarna shipping assistant, check that it's enabled in the Admin.

If you get an error using composer to install the klarna-m2 extension, similar to error messages below, verify that you are using the same public and private keys associated with the Adobe Commerce account which was used to order the extension from the Adobe Commerce Marketplace. It’s required that these keys are the same ones as those used to install Adobe Commerce. (Also, make sure to clear the cache after any changes.)
If you’re still having issues installing the extension, please contact the Adobe Commerce Marketplace support for assistance in getting access to the extensions which were purchased.

Installation failed reverting ./composer.json

Your requirement could not be resolved to an installable set of packages

[InvalidArgumentException] Could not find a matching version of package klarna/m2-klarna.

Make sure the tax configuration matches the supported settings.

The "validation_service_failed" error means that the order validation that happens between Klarna and the shop failed. Klarna will send a callback to the merchant’s system prior to redirecting the consumer to the success page. This callback is what reported the error. If you have the debug mode enabled, you should be able to review your klarna_*.log files to see what error was reported.

The “No such entity” error isn't expected in versions later than 2.3.6 and 2.4.1. Upgrading to a later version of Adobe Commerce should resolve the error.

If an error message states that a shipping option is unavailable, check the following:

  • Check if the shop is publicly accessible. If not, make it available on a public site or tunnel to interact with Klarna checkout.
  • Make sure there are no firewall rules that can block requests to Klarna.
  • Make sure there are no third-party extensions that can interfere with Klarna checkout.

Check the value in the customer address setting and set it to at least 2 lines:

  • In Enterprise edition (EE), go to Stores > Customer Address Attributes > Street > Lines Count setting
  • In Community edition (CE), go to Stores > Configuration > Customers > Customer configuration > Name and Address options > Number of Lines