General information
Additional Klarna plugins
Klarna Order Management
Introduction
When an order is created in WooCommerce and a order number exists in Klarnas system, you have the possibility to handle the order management in Klarna directly from WooCommerce. This way you can save time and don’t have to work in both systems simultaneously.
- Klarna Order Management provides post-purchase order management for the Klarna Payments for WooCommerce and Klarna Checkout for WooCommerce plugins.
- Klarna Order Management support High-Performance Order Storage (HPOS).
English: use the support form on krokedil.com to get help.
Svenska: använd supportformuläret på krokedil.se för att få hjälp.
Helpful information before you contact us can be found in the How to prepare a support ticket article.
Technical information – plugin data and changelog
English product page on krokedil.com
Svensk produktsida på krokedil.se
Related documentation
- Klarna Payments documentation
Read more about how to configure Klarna Payments for WooCommerce. - Klarna Checkout documentation
Read more about how to configure Klarna Checkout for WooCommerce.
Requirements
You need to have either Klarna Checkout for WooCommerce or Klarna Payments for WooCommerce installed and configured to use Klarna Order Management.
Installation
There are three ways to install Klarna Order Management.
Option 1 – via the WordPress plugin uploader:
- Download the .zip file via this download link
- Go to: WordPress Admin → Plugins → Add New and upload the file via Upload plugin.
- Install Now and Activate.
Option 2 – via the WordPress plugin installer:
- Go to: WordPress Admin → Plugins → Add New and do a Keyword search for Klarna Order Management.
- Install Now and Activate.
Option 3 – via the Klarna Add-ons menu in WooCommerce:
- Go to: WordPress Admin → WooCommerce → Klarna Add-ons
- Click on Not installed to install and then Activate.
Order management settings
You can find the settings for the Klarna Order Management for WooCommerce on the same page as the settings for your Klarna payment method.
Go to WooCommerce → Payments and click on your Klarna payment method. On this page, scroll down to the Klarna Order Management settings.
Here you can see all the settings available for the plugin.
Please note that these settings look a bit different depending if you’re using Klarna Payments or Klarna Checkout.
Klarna Payments:
Klarna Checkout:
On order completion: This setting will enable the automatic capture of a Klarna order when the relevant WooCommerce order is set to Completed.
On order cancel: This setting will enable the automatic canceling of a Klarna order when the relevant WooCommerce order is set to Canceled.
On order update: This setting will enable the automatic update of a Klarna order when the relevant WooCommerce order is updated before it has been Captured or Canceled.
On order creation (manual): This setting will make it possible to automatically fetch the customers address from a manually created admin order if there is a Klarna order ID added as the transaction id. You can read more about this in the Klarna Point of Sale integration section further down on this page.
Force capture full order: This setting will force the capture of any remaining amount in the Klarna order, instead of capturing each order line separately. Useful if the Klarna order has been updated by an ERP (Enterprise Resource Planning) system.
Debug log: This setting will enable that debug messages are saved in the WooCommerce System Status log.
Cancel an order
- The WooCommerce order status need to be set as Processing.
- Go to the order edit screen by navigate to WooCommerce → Orders and click on the order you want to edit.
- In the Order details box there is a selectbox named Status. Change the status to Cancelled.
- Click the Update button located at the top right on the screen.
- If everything was successful a new order note saying Klarna order cancelled is created.
Update an order
Please also note that the Klarna system does not accept all order updates. Increasing the order amount will likely not be approved, and instead the customer should place a new order. For additional support regarding that, please contact Klarna merchant support.
There is a known compatibility issue between WooCommerce AvaTax and Klarna Order Management. You can read more about this further down on this page.
- The order status should not have been set to Completed yet (no activation number should exist for the order in Klarnas system).
- Go to the order edit screen by navigate to WooCommerce → Orders and click on the order you want to edit.
- In the Order details box there is a selectbox named Status. Change the status to On hold.
- Click the Update button located at the top right on the screen.
- Edit the order item lines by first clicking Edit item.
Make the changes, in this example we lower the price Total for the purchased product.
Click the Save button below the order items box.
After you have pressed the Save button you need to make sure that the tax amount is correct and corresponds with the new price. Make sure that all order line tax fields adds up to the same amount as the total tax. If it doesn’t – click Recalculate.
It is important that you verify that the changes you have made to your order are visible in your Klarna Merchant Portal before you move on to the next step.
- Change the status to Processing in the same way as in step 3.
- Press the Update button as seen in step 4.
- The order is now updated, both in WooCommerce and Klarna’s system.
Capture an order
- The WooCommerce order status need to be set as Processing.
- Go to the order edit screen by navigate to WooCommerce → Orders and click on the order you want to edit.
- In the Order details box there is a selectbox named Status. Change the status to Completed.
- Click the Update button located at the top right on the screen.
- If everything was successful a new order note is created with information about the invoice number
The module does not support partial captures.
Refund an order
- The WooCommerce order status need to be set as Completed.
- Go to the order edit screen by navigate to WooCommerce → Orders and click on the order you want to edit.
- In the Order items box, press the Refund button.
- Here you can choose to refund the full sum for an item (1), part of the sum (2) or shipping (3).
If you enter a sum manually (2) you also need to enter the correct tax to refund manually, as opposed to when you refund the full sum for an item in which case the tax is automatically calculated. With shipping (3) you need to enter the amount manually, as well as the tax. Not to be confused with the Refund manually button. - Press the Refund via Klarna button.
- If everything was successful a new order note is created with information about the refund in Klarnas system.
Disable and enable order synchronization
By default, order synchronization is always enabled. It is however possible to turn off order synchronization between WooCommerce and Klarna via a setting in the Klarna Order Management metabox.
When disabled, you can modify the WooCommerce order in any way (e.g., change order status, modify order lines) without effecting the corresponding Klarna order.
When disabled any changes in either system will have to be done manually.
- Click Edit in the Klarna Order Management metabox.
- Click the toggle switch to disable, or enable, order synchronization.
- Click OK to save.
Klarna Point of Sale integration
With the Klarna Order Management for WooCommerce plugin you can now add your Klarna Point of Sale orders to WooCommerce to be able to handle them through our plugin. To do this you need to follow the steps bellow:
- Go to the order screen by navigating to WooCommerce → Orders and click the Add order button.
- Click Edit and scroll down to Payment method. Choose Klarna from the dropdown and enter the Klarna order ID from the Point of Sale into the Transaction ID field.
- Click on the Create button.
After this is done, the order should automatically be updated with the customers address information and purchased products.
And you can now start using the Order Management plugin to manage the order directly through WooCommerce.
Anonymize product names sent to Klarna
To modify the order data sent to Klarna, to anonymize the product names, you can add this filter. You can use the Code Snippets plugin, or something similar of your choice.
add_filter(
'kom_order_capture_args',
function( $request_args ) {
foreach ( $request_args['order_lines'] as $index => $order_line ) {
if ( in_array( $order_line['type'], array( 'physical', 'digital' ) ) ) {
$request_args['order_lines'][ $index ]['name'] = md5( $order_line['name'] );
}
}
return $request_args;
}
);
This will result in the product names sent to Klarna will be just a random series of letters and numbers:
The real name of the product is still visible in the WooCommerce order. It is only in Klarna’s system where the name is anonymized/censored.
Troubleshooting / plugin logic
If you run into issues or use other plugins that modifies the order handling logic, this is how the Klarna Order Management plugin works.
- To be able to capture an order, the Klarna order ID must be available in either of the two order meta fields
_wc_klarna_order_id
or_transaction_id
(_transaction_id is the regular WooCommerce transaction ID field). - When the order is captured in Klarnas system, Klarna sends back a Capture ID that is saved in the order in the meta data field
_wc_klarna_capture_id
. - To refund an order in Klarna directly from WooCommerce the Capture ID saved in the
_wc_klarna_capture_id
meta field must be available.
Known compatibility issues
WooCommerce AvaTax
When using the plugin WooCommerce Avatax the Update order function will not work in Klarna Order Management. If you want to update the order you need to handle this manually in both WooCommerce and the Klarna Merchant Portal.
When updating an order
Make sure you turn off the update function On order update in the Klarna Order Management settings before you make any changes to the order in WooCommerce. Then make the same changes to the order in the Klarna Merchant Portal.
When setting an order to Completed
You also need to turn off the update function On order completion in the Klarna Order Management settings before you change the the order status to Completed in WooCommerce. This order status also needs to be handled manually in both WooCommerce and the Klarna Merchant Portal.