Troubleshooting the Pay for order/Hosted Payment Page flow

  1. Home
  2. /
  3. Klarna Checkout 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 Checkout 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 Checkout payment gateway.

I see pending orders in WooCommerce, is something wrong?

As mentioned above – you can have pending orders in WooCommerce with Klarna Checkout 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.

Order creation step by step

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. KCO create HPP (POST)

id:klarna-order-id,type:POST, title: KCO create HPP

A pending payment Woo order was created successfully. Attempting to create a new hosted payment page session at Klarna.

2. Redirecting to hosted payment page

Processing order WC order ID (Klarna ID: klarna-order-id) OK. Redirecting to hosted payment page.

The hosted payment page was successfully created, and the customer will be redirected to that page. You should see “Customer redirected to Klarna Hosted Payment Page.” in the Woo order note if the redirect was successful.

3. Confirm the klarna order from the confirmation page

klarna-order-id: Confirm the klarna order from the confirmation page."

This indicates that the purchase process was completed, and the customer was successfully redirected to the confirmation (thank you) page. .

This event should happen once.

4. KCO get order management order (POST)

id:klarna-order-id, type: POST,title: KCO get order management order

This is where the plugin gets the order from Klarna’s order management API.

This event should happen once.

5. KCO acknowledge order (POST)

id:klarna-order-id,"type":"POST","title":"KCO acknowledge order”

Klarna requires that we acknowledge that the order was completed successfully. This confirms that the acknowledgment was issued to Klarna. 

This event should happen once.

6. Fraud status accepted

klarna-order-id: Fraud status accepted for order WC order ID. payment_complete triggered.

If the payment went well, you should now see this in the log (where WC order ID is replaced by your WooCommerce order number)

This event only applies to some regions and should in that case happen once.

7. KCO get order (GET)

id:klarna-order-id, type:GET, title: KCO get order

This request is made when the customer has landed on the thank-you page and Klarna has changed the order status from checkout_incomplete to checkout_complete (indicating the customer has been authorized successfully).