Troubleshooting the Pay for order/Hosted Payment Page flow

  1. Home
  2. /
  3. Klarna Payments for WooCommerce
  4. /
  5. Troubleshooting
  6. /
  7. Troubleshooting the Pay for order/Hosted Payment Page flow

Troubleshooting the Pay for order/Hosted Payment Page flow

The Checkout flow in Klarna Payments is constructed in a way that a WooCommerce order will be created first (in Pending status), then the Klarna order is placed, and finally the WooCommerce order is updated to Processing status. This flow is more compatible with other WooCommerce plugins.

This checkout flow also means that Pending orders can be visible in WooCommerce, where the payment has not been finalized in Klarna (for example card payment where there was not enough funds on the card). This is part of the general WooCommerce checkout flow, and it does not implicate that something is wrong. It is just a new scenario for the Klarna Payments payment gateway.


I see pending orders in WooCommerce, is something wrong?


As mentioned above – you can have pending orders in WooCommerce with Klarna Payments as the payment method without any errors in your store. These might just be orders not finalized by the customer.

However, if you want to troubleshoot this a bit closer, here’s how you do it.

  • Make sure that you have turned on Logging in the plugin settings.
  • The logs can be found by navigating to WooCommerce  Status  Logs.

Klarna Developer logs


The Klarna Developer logs allows you to inspect the technical communication (API calls) between your back office and Klarna.

Read more in the Klarna Developer logs section.


Order creation step by step


Order creation step by step and how to debug and follow it in the log

Some of these events happen one time in the order creation, while others can happen multiple times. We have added a note to each event on whether you should expect to find it in the log once or several times.

1. Create session (POST)

"type":"POST","title":"Create session"

When customers visit the checkout page, a new checkout session is initiated. This session includes data about which Klarna payment methods to display to the customer, and a session ID for identifying, and referring to this session.

This event should happen once.

2. Place order (POST)

"type":"POST","title":"Place order"

When the customer has been authorized by Klarna, and the purchase is considered complete (as indicated by the modal disappearing), the Woo store will be informed so that it can take action. At this point, we’ll send the merchant reference number to Klarna and the URL to redirect the customer to (i.e., the confirmation URL), and save any metadata related to the Woo order. When this has happened, you’ll see the above message in the Woo logs.

This event should happen once, but if the “Place order” fails, the process may be repeated.