Support

Zuletzt bearbeitet am: 08.12.2022

FAQ

Payment types are not displayed

Error description

A Klarna payment method is not displayed in the checkout.

Cause

  • The payment type was not correctly assigned to the shipping method.
  • There is an error. Please check the debug log.
  • You have entered an address from a country that is not supported.
  • Klarna Riskmanagement has not approved you.

The Klarna plugin sends a request to Klarna when you enter the checkout and gets back a response with the possible payment methods. On the payment type selection page, a query is then made for each allowed payment type, where the Klarna API (Riskmanagement) can exclude it.

Solution

Make sure that the corresponding Klarna payment method is also assigned to the shipment, that there is no error and that Klarna is approved for the specified country. To test if your address is excluded from Klarna Riskmanagement, use another account (different address and email) and test again. Also clear your browser cookies or test in a new private tab to get a new Klarna API session.

Incorrect access data / 401 Authorization Required

Error description.

  • The payment types do not load in the 2nd step of the checkout on the Klarna Payments plugin.
  • The Klarna Checkout does not load.
  • The credentials test in the Shopware backend in the plugin settings fails.
  • In the debug log there is the following error "401 Authorization Required".

Cause

Your credentials are incorrect.

Solution

Check your access data again for correctness. It can happen that you copied one space too many or another character too little.

Also note that our plugin uses the new Klarna API and therefore requires appropriate credentials. The API username is approximately this format: "K123456_e25be1fcacbc". The access data for our plugin can be found at:

If the test mode works without problems, but the live mode does not, either the access data are wrong or you are not yet activated by Klarna. You can test the access data from our plugin settings.

INVALID_OPERATION

Error description

When Klarna Payments plugin is active, no more payment types are loaded in the 2nd step of checkout. In the Debug Log of the plugin you can find the following error: "INVALID_OPERATION"

Cause.

This error occurs when we try to establish a session with the Klarna API. Probably you have not completed the Klarna Onboarding process.

Solution

Please contact Klarna Support with the error description and error.

MERCHANT_INACTIVE

Error description

If the Klarna plugin is active, no more payment types are loaded in the 2nd step of the checkout resp. the Klarna checkout does not load. In the Debug Log log of the plugin you can find the following error: "MERCHANT_INACTIVE".

Cause.

This error occurs when we try to establish a session with the Klarna API. You are probably not yet enabled by Klarna.

Solution

Please contact Klarna Support with the error description and error.

Bad value: merchant_urls.terms (may not be null)

Error description

The Klarna Checkout plugin does not load. In the Debug Log of the plugin you can find the following error: "Bad value: merchant_urls.terms (may not be null) "

Cause.

You forgot to set the link to the terms and conditions and the right of withdrawal in the plugin settings.

Solution

Set the link to the T&C and the right of withdrawal in the plug settings of the Klarna plugin.

The link should be complete (e.g. https://www.MeinShop.de/agb, https://www.MeinShop.de/widerrufsrecht)

NOT_FOUND

Error description

When the Klarna Payments plugin is active, it is no longer possible to select payment types in the 2nd step of the checkout. In the Debug Log of the plugin you can find the following error: "error_code" : "NOT_FOUND", "error_messages" : [ "Invalid session id" ]

Cause.

This error occurs when we try to communicate with the Klarna API but use an incorrect session id. You probably have a customized template or another plugin is interfering here.

Solution

Try repeating the whole thing in Shopware's default Responsive Template. Also clear your browser cookies or use a private tab so we can establish a new session with Klarna. If the error still occurs, disable all plugins except for the Klarna plugin. Clear the Shopware cache and recompile the themes. Also delete your browser cookies again. If the error no longer occurs, turn the plugins back on in order and test each time in between until the error occurs again. With this, you have identified the plugin that is causing the problems.

DUMMY_ORDER_ID

Error description In the Klarna debug log there is the following error message:

{"message": "GET /ordermanagement/v1/orders/DUMMY_ORDER_ID HTTP/1.1\r\nHost: api.klarna.com\r\nAuthorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXX0XXXXXXXX==\r\nAccept: application/json\r\nContent-Type: application/json\r\nUser-Agent: Shopware 5. 5.10/BestitKlarnaCheckout 1.1.2\r\n\r\n","context":[],"level":400,"level_name":"ERROR","channel":"BestitKlarnaCheckout","datetime":{"date":"2019-08-09 12:08:31.040294","timezone_type":3,"timezone":"Europe/Berlin"},"extra":[]}
{"message": "HTTP/1. 1 400 Bad Request\r\nDate: Fri, 09 Aug 2019 10:00:00 GMT\r\nContent-Type: application/json\r\nContent-Length: 141\r\nConnection: keep-alive\r\nServer: openresty\r\nKlarna-Correlation-Id: xxxxxxx-xxxx-xxxx-xxxxxxxxxxxxr\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\n\r\n{\"error_code\":\"INVALID_ORDER_ID\",\"error_messages\":[\"Order ID must be a valid UUID. \"],\"correlation_id\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"}","context":[],"level":400,"level_name":"ERROR","channel":"BestitKlarnaCheckout","datetime":{"date":"2019-08-09 12:00:00. 000000","timezone_type":3,"timezone":"Europe/Berlin"},"extra":[]}

This error message is only from the access data test you ran from the plugin settings in the Shopware backend and can be ignored.

The Klarna API itself does not provide a function to test the access data. We therefore make do with a trick and make a request to the Klarna API for the order with the number "DUMMY_ORDER_ID". This, of course, did not exist at Klarna. If the Klarna API answers that this order does not exist we know that the credentials are correct. If the credentials are incorrect, the Klarna API would tell us at this point and not allow the request.

Debug log

For better analysis in support, change log level to "debug" in Klarna plugin settings beforehand and recreate the problem.

You can download the Klarna Debug Log from the Shopware backend. 1: Log in to your Shopware backend and click on Logfile in the Settings menu.

 

In the newly opened window, select the System Log tab. In the dropdown field select the log you want to download. Then click the Download button and the log will be downloaded.

 

The 2nd option is to view the logs directly on the server. They are located in the Shopware directory under var/log/ and follow the naming bestit_klarna_production-YYYY-MM-DD.log


Create support request