Klarna Docs - Troubleshooting

If not properly configured, Klarna Checkout may fail to initialize. There are several methods to help debug exactly what causes Klarna Checkout to fail to load.

A file will be created in your var/log directory named ‘klarna_api.log’ that includes the request and responses.  Klarna APIs will respond with verbose details that cause checkout to load. Review the logs to help debug.

To enable debug mode navigate to:

Stores ⇒ Configuration ⇒ Sales ⇒ Payment Methods ⇒ Klarna ⇒ Klarna API

Set the option ‘Debug Mode’ to ‘Enabled’.

In some markets Klarna does not pass the state/region details to Magento2 in checkout. The requirement for state/region needs to be disabled in the Magento2 admin.

Navigate to:

Stores ⇒ Configuration ⇒ General ⇒ General ⇒ States Options

Remove your country from the multi select list.

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

This can have multiple reasons for example:

  • Is the shop reachable from outside (even for local development, your shop must be publicly accessible. Use a service such as https://ngrok.com)
  • Is the shop using an https address?
  • Is the SSL certificate self-signed (these won’t work, use https://letsencrypt.org/ instead)
  • Is the website password secured?
  • Are you whitelisting specific IP’s? If yes: We use AWS, so you would need to whitelist all of AWS. It is better that you don’t try to use IP, instead allow all traffic to any URL with /klarna/ or /kco/. If you really have to use IPs, see https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html

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, Magento will reject the order causing us to cancel the order.  If you offer different shipping method 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 that Magento does not have regional options for the customer will at least be presented with the fallback option.

Starting from version 2.4.4 changes were made to our Klarna Checkout extension. Please follow these instructions on how to smoothly upgrade from versions 2.3.0-2.4.3 to 2.4.4.

Klarna is always happy to work with merchants to help resolve implementation issues. Reach out to your Klarna Representative for assistance. Or email magento@klarna.com for support with the extension itself