Troubleshooting the checkout flow

  1. Home
  2. /
  3. Klarna Checkout for WooCommerce
  4. /
  5. Troubleshooting
  6. /
  7. Troubleshooting the checkout flow

Troubleshooting the checkout flow

From version 2.0 of Klarna Checkout for WooCommerce the checkout flow has changed.

The WooCommerce order will now be created first (in Pending status), then the Klarna order is placed, and finally the WooCommerce order is updated to Processing status. This update is more compatible with other WooCommerce plugins.

The new 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

  1. When the customer clicks the Place order button in the Klarna iframe, the following log should be added to the log file: validation_callback from Klarna triggered.
  2. In this sequence the Klarna Checkout plugin populates the address fields in the regular WooCommerce checkout form and submits the form. Now a pending order is created in WooCommerce.
  3. If the order creation went well you should now see the following logs: Successfully placed order. Sending \"should_proceed: true\" to Klarna and Confirm the klarna order from the confirmation page.
  4. If the payment went well you should now see the following log (where KR-KCO-XXXX is replaced by your order number): Fraud status accepted for order KR-KCO-XXXX. payment_complete triggered.
  5. If the order creation didn’t go as expected you might see a Checkout error caused by WooCommerce or an AJAX error in the log. If you see the AJAX error you need to talk to your developer or the support.

If you don’t see the log Fraud status accepted for order KR-KCO-XXXX. payment_complete triggered., then there is something wrong in Klarnas system (or in the communication between Klarna and BankID/3DSecure/the acquiring bank). For more information in these cases you need to contact your regions Klarna Merchant Support.

If something went wrong in the confirmation (step 3) we have a backup function running and then you will see a Confirm the klarna order from the thankyou page in the logs.

Klarna Order Management related logs that you see in the KCO Logs (between Step 3 and 4):

KCO get order management order
The plugin get the order from Klarnas order management API.

KCO acknowledge order
The plugin acknowledges that the order is done.

KCO set merchant reference
The WC order id and WC order number is set on the Klarna order.