Troubleshooting WooCommerce Subscriptions and KCO

  1. Home
  2. /
  3. Kustom Checkout for WooCommerce
  4. /
  5. Troubleshooting
  6. /
  7. Troubleshooting WooCommerce Subscriptions and KCO

Troubleshooting WooCommerce Subscriptions and KCO

As Klarna Checkout transitions to Kustom Checkout, please note that parts of this documentation are still being updated. You may come across references to Klarna, outdated screenshots, or broken links.

We’re working continuously to revise all content, and we appreciate your patience during this process.

The Checkout flow in Kustom Checkout is constructed in a way that a WooCommerce order will be created first (in Pending status), then the Kustom 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 Kustom (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 Kustom Checkout payment gateway.


I see pending orders in WooCommerce, is something wrong?


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

First, make sure that you have turned on Logging in the plugin settings:

The logs can be found by navigating to WooCommerce  Status  Logs.


Kustom Developer logs


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

Read more in the Kustom Developer logs section.


Recurring token


When purchasing a subscription product the log will also create a recurring_token after step 15 KCO get order (GET) in the order creation step by step guide.

The following will also be logged:
…"recurring_token": your-recurring-token...

This request is made whenever Kustom notifies us about a change that occurred. We need to retrieve the updated form data from them in such cases. It’s important to note that this type of request can occur multiple times. In this case Kustom notifies that a recurring_token is created.


Manage Subscription


When handling the subscription order via My account as a customer or via backend as an administrator, for example Suspend, Cancel, Reactivate or Change address on the subscription, nothing will be logged.


Process Renewal order log flow


When processing a renewal order on an already existing subscription a new order should be created in WooCommerce that is connected to this Subscription and this will be added to the log:

KCO create recurring order

id:kustom-order-id, type: POST, title: KCO create recurring order...


Change payment via the My Account page


When a customer change payment via the Change payment-button on the Subscription via the My Account page, this will be logged:

1. KCO create order (POST)

id:kustom-order-id, type:POST,"title": KCO create order

When changing the payment method the customer has to place a new order with a order total of 0 kr. When customers visit the checkout page, a new checkout session is initiated. This action generates a fresh Kustom order ID that will be linked to the ongoing session.

This event should happen once.

2. KCO create HPP (POST)

id:kustom-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 Kustom.

This event should happen once.

3. Redirecting to hosted payment page

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

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

This event should happen once.

4. KCO get order (GET)

…"recurring_token":your-recurring-token}...

This request is made whenever Kustom notifies us about a change that occurred. We need to retrieve the updated form data from them in such cases. In this case Kustom notifies that a recurring_token is created.

This event can happen more than once.


Errors that might happen


Failed to redirect to hosted payment page

Failed to create a HPP session with Kustom. Order WC order ID|merchant reference (Kustom ID: kustom-order-id) OK. Redirecting to hosted payment page

We couldn’t create a new hosted payment page session for some reason. At this point, the pending payment order that was created earlier will remain, and similarly, the customer will stay on the same page.

If this error happens it should happen between step 2 and 3 above.