Klarna Checkout – FAQ

A collection of Frequently Asked Questions


I see the error "Klarna Checkout error (Bad value: merchant_urls.terms (must be a valid http or https URI))." on my checkout page, what is wrong?

This means that you have not set a terms and condition page in WooCommerce. 

Go to  WooCommerce > Settings > Advanced and then go to the Page Setup section and make sure you have set a Terms and Condition page there.

If you do have set a page there, go and check (under your  Pages section in the WordPress dashboard) that your page that contains your terms and condition information has the Status: Published.


Customers can not make a purchase in my store and receives the error "Sorry, this purchase cannot be processed."

Since of version 1.10.2 we require all validation callbacks from Klarna to succeed and result in a 200 HTTP response from your server. If the callback fails Klarna will not proceed with the payment and the customer will not be able to create the order in WooCommerce.

Information about why this is happening and how you can solve it, can be found in the Callback docs article here

As this is a communication issue between your website and Klarna there isn't much we (Krokedil) can troubleshoot around this. 
For more information contact  your regions Klarna Merchant contact.


I'm trying to change status on some of my orders to Completed but it automatically changes back to On Hold. In the status it says: Klarna order could not be captured at this time. Why is this happening?

Often when this happen it's due to the fact that the order has already been captured manually in your Klarna Online account. The easiest way to solve this is to temporarily de-activate the Klarna Order Management plugin, change the order status on the orders to Completed and then activate the Klarna Order Management plugin again. 

If you always manually captures the orders in Klarna and handles the orders separately in WooCommerce and not want to use the functionality that the Klarna Order Management offers you don't need the Order Management plugin activated.


I'm using Cloudflare CDN and WAF and it is blocking the validation call from Klarna, how do I fix this?

If you are using Cloudflare CDN and their WAF Firewall (or any other WAF/CDN/Firewall too) you need to create a specific Page Rule in your Cloudflare account to whitelist the API-calls that is needed for the Klarna plugin to work properly you can read more about callbacks here.

Thanks to Niclas Skarnes for reporting this. 

What is the reason why the order is created via API callback?

From version 2.x of the plugin, orders are no longer created via the callback. Instead, they are created when the customer clicks the Complete purchase button in the checkout (right before the purchase is completed in Klarna). Read more about the change in the checkout flow in v2.x here.


Error: Bad value: order_amount

When seeing this error:  Bad value: order_amount in the checkout we recommend you to check your tax settings and rules and make sure there aren’t 0% tax rules being applied incorrectly (as in this screen shot).


The customers see the error message “Please try again, something went wrong with processing your order.”

This indicates that they have hit the timeout that we have for the events. This can be increased using the following code: 

add_filter( 'kco_checkout_timeout_duration', 'kco_set_custom_timeout' );
        function kco_set_custom_timeout( $time ) {
    	return 30;
}

The “return 30;” can be changed to whatever time they need to make this work. Default is 20 from the plugin.



When I click on the Place Order button it just reloads the page, what is wrong?


The cases we have seen so far when this is happening is a plugin compatibility issue with another plugin. The plugin we have seen when troubleshooting this is the multilingual plugin WeGlot.

To get the checkout to work properly you need to exclude the checkout url in the WeGlot settings:

After this has been done you will see the Klarna modal window pop-up again when clicking on the Place Order button..


Customers see error message READ_ONLY_ORDER in checkout

This happens when the plugin tries to update an order that already has been completed in Klarna. Usually this happens because there is something wrong in the sequence when the customer should be redirected to the thank-you page in WooCommerce. 


Customers see error message 
{"error_code":"internal_server_error","error_messages":["internal server error"],"correlation_id":"xxxxx-xxxxx","service_version":"xxxxx"}

The internal_server_error appears when Klarna attempts to redirect the customer to the "order received - thank you" page after the purchase has been completed at Klarna. Instead of being redirected back to the shop, the customer lands on js.klarna.com and gets the internal_server_error, similar to above example.

This error can be caused by the WooCoomerce Checkout endpoint for " Order received" ("order-received" by default) having a space or special character inserted into the name of the URL. Make sure your URLs in WooCommerce > Settings > Advanced > Checkout endpoints all are one word or have hyphens if needed.
If you have a multilingual plugin and have translated your shop, this can be a problem as we have seen translations of "order-received" where there is a space instead of a hyphen in the translated string and the space in the URL causes an error where the URL ends unexpectedly.

Customers see error message "Oops" in checkout

This is a known issue with the Elementor Page Builder, but could also apply to other Page Builders.

When using the Elementor plugin and you receive this error message in the checkout:

Oops.
It looks like an important part of the checkout experience failed to load and we are unable to offer you a way to pay right now.
Please refresh the page to try again. If this isn't the first time you've seen this message then there may be a more permanent error and you should contact customer service at Klarna.com.

Then you need to check if you are using the [woocommerce_checkout] shortcode in a regular text widget in Elementor? If you do, you need to use the Elementor shortcode widget or their checkout site page.
Elementor does not allow you to run shortcodes in the regular text widget for security reasons.


Adding a free shipping coupon doesn't visibly change the shipping cost within the shipping options of the Klarna Checkout iframe, although the total price is updated correctly.

The selected shipping option does not show 0 or free after a valid free shipping coupon is applied to the customer's checkout session. The total price is reduced by the shipping cost, but the original shipping cost is still shown out in the selected shipping method. One option to avoid this issue is to not display shipping options inside the Klarna iframe (via the "Shipping methods in iframe" setting in the Klarna Checkout plugin settings).


How do I see the exact payment method on WooCommerce orders?

Klarna offers different payment methods for different regions and similar payment methods may be referred to differently. Although WooCommerce permits you to switch language, it is difficult for us to map the payment method to the appropriate term that matches the same (if any) payment method in your regional language.


Order line data doesn't reflect original price, only discounted price


When a merchant is applying a discount on an item, the price of the item is modified. The actual price of the item is now the discounted price and the original price is no longer valid. Because of the architecture of WooCommerce the original price is considered non-existant as long as the discount is applied.


KCO iframe is not included in the WooCommerce Thank you page


This happens when you have a custom Thank you page that is missing the action do_action("woocommerce_thankyou_kco");
This action needs to be added to the Thank you page template.

Please note that a theme can replace the standard template for the Thank you page and in this case the action needs to be added to a child theme as well.


Error message: Bad value: order_lines[2].name (size must be between 1 and 255)


This tells you that the titel of the order line you are trying to use is empty (or is corrupt) so that is why you see this in the checkout:
Bad value: order_lines[2].name (size must be between 1 and 255)

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.