Get started
Customization
Troubleshooting
- Embedded checkouts in WooCommerce
- Checkout blocks in WooCommerce
- Error codes
- Compatible plugins and themes
- Known compatibility issues
- Files to exclude from optimization
- Shipping Methods in iframe
- FAQ
- Optimizing your checkout when using an Iframe-based checkout
- Callbacks
- Troubleshooting the checkout flow
- Troubleshooting the Pay for order/Hosted Payment Page flow
- Troubleshooting WooCommerce Subscriptions and KCO
- Kustom Developer logs
- Pending payment orders and held stock
Additional related plugins
The checkout flow
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 used for this plugin can result in Pending orders existing in WooCommerce, where the payment has not been finalized in Kustom. This is part of the general WooCommerce checkout flow, and it does not implicate that something is wrong.
The checkout flow
- Customer navigates to the checkout page in WooCommerce. If Kustom Checkout is the selected (or only) payment method, a Klarna order id is created.
- When the customer clicks the Place order button in KCO, a JavaScript event is triggered by Klarna.
- The standard WooCommerce checkout form is submitted by the Kustom Checkout plugin and a pending order is created in WooCommerce. This order has not yet been paid for and you should not change the status to Processing/Completed manually.
- If the order creation went well, the KCO plugin responds with a true message in the JavaScript event (if something went wrong during the order creation process the KCO plugin will respond with a false message in the JavaScript event and Klarna will not finalize the purchase. Instead an error notice will be displayed for the customer).
- Provided that the KCO plugin respond with a true message, Klarna then finalizes the purchase in their system.
- Klarna redirects the customer to the confirmation URL.
- The KCO plugin redirects the customer to the order received page and updates the order status to Processing in WooCommerce.
When the customer is redirected to the confirmation URL, the KCO plugin makes a request to Kustom to confirm the payment status. In this sequence the plugin changes the request endpoint from Kustom’s Checkout API to the Order Management API. This is necessary to be able to get information about the fraud status of the order.
In some cases, the order is not yet available in Kustom’s Order Management platform. In these cases, the plugin changes the WooCommerce order status to On hold together with the order note Waiting for verification from Kustom’s push notification. The push notification callback from Kustom will be triggered approximately 2 minutes later. If everything is ok in Kustom the WooCommerce order will then change status to Processing.
FAQ
I have a lot of pending orders – what should I do?
If the amount of pending orders seems too high there might be something wrong with the configuration in your Kustom merchant account. To investigate this closer you can look into the Kustom Checkout logs in WooCommerce or in your Kustom merchant portal. Search for words like error & Bad value.
You can also contact Kustom directly and ask if they can help you investigate further. Make sure you provide the Kustom order id for the purchase.
Customers gets the notice Please try again, something went wrong with processing your order
This message is displayed to the customer when the WooCommerce order creation process timeout. The timeout time is set to 20 seconds. On some slow servers the problem is solved by increasing this time. This can be done via a filter:
<?php
/**
* Filter hook kco_checkout_timeout_duration
* Modify the timeout time used during the order creation process in Woocommerce.
*
* Used together with Kustom Checkout for WooCommerce plugin v2.x.
*
* Add this code to your themes functions.php file or include it in a separate functionality plugin (https://css-tricks.com/wordpress-functionality-plugins/).
*/
add_filter( 'kco_checkout_timeout_duration', 'kco_set_custom_timeout' );
function kco_set_custom_timeout( $time ) {
return 30;
}
If you want to search your Kustom Checkout plugin logs for this issue you can search for Timeout for validation_callback triggered.