Klarna Docs - Order Management

The Klarna Payments integration for Shopify provides integrated order management. Order management for Klarna orders should continue to be processed as part of your standard order management processing via Shopify.  Klarna orders can be fulfilled, refunded, and/or cancelled in the same way as for other Shopify orders.  (While order management could be done directly via the Klarna merchant portal, this will cause Klarna data and Shopify order data to be out of sync and could result in unintended updates, e.g. duplicated captures or refunds.  Unless there is a problem, all order management should be done through the Shopify admin, not the Klarna merchant portal.)

When Klarna orders are placed in Shopify, the Shopify order’s payment status is set to ‘Paid’. 

(It is not supported for this HPSDK integration to place Klarna orders in ‘Authorized’ payment status, as Shopify only currently supports a single capture per authorization for HPSDK orders. The new payments integration will support separate authorization and capture.)

When the order is placed in Shopify, the Klarna order_id is set in 2 Shopify order fields: the order’s transaction’s "authorization" field & transaction receipt’s "x_gateway_reference" field.  These fields are available in the Shopify order timeline notes per screenshot below, the order’s JSON (available in a browser by adding “.json” to the Shopify order URL, e.g. https://store-domain.myshopify.com/admin/orders/shopify-order-id.json, and via the Shopify order transaction API.

The Shopify order name is set in Klarna order's merchant_reference1, and the Shopify order id is set in the Klarna order’s merchant reference 2 field.

Currently Klarna offers fraud pending functionality, used primarily only for US & UK markets.  With fraud pending, orders are reviewed by Klarna and should not be fulfilled (shipped) by merchants until after Klarna has made the fraud decision.  For more information, please see here

When a Shopify order has been placed by a customer, if the order is awaiting Klarna fraud review, the Shopify order payment status will be ‘Payment Pending’.

If a pending fraud order is accepted, the Shopify order payment status will be updated to Paid.

If a pending fraud order is rejected, the Shopify order will be cancelled.

If an order is fraud accepted, but later reviewed and determined to be fraudulent, a fraud stop email will be sent to the merchant.  The Shopify order is not currently updated for a FRAUD STOPPED event.  (Unfortunately once a Shopify order has been marked as Paid, the order payment status cannot be changed.)

To cancel a Klarna Payments order, navigate to the desired order and select the “Cancel” option from the Shopify “More Actions” option at the top right, as shown below. The appropriate data will be sent from Shopify to Klarna and the order will be cancelled in Klarna as well. 

In addition to order management functionality of cancelling an order or refunding an order, Shopify also offers cancel fulfillment functionality.  Cancel fulfillment indicates the cancellation of the shipment of goods, but this action itself does NOT update the Klarna order status or order amount; the code does log a 0 amount refund on the Klarna order though to track this action performed within Shopify.  In order to update the Klarna order to affect customer payment, the Shopify order must either be cancelled or refunded. 

To fulfill a Klarna Payments order, navigate to the desired order, fill in the appropriate information, and click the “Fulfill items” button.  The appropriate data will be sent from Shopify to Klarna and the order will be updated as captured in Klarna accordingly, and Klarna will pay the merchant for the captured amount of the order. 

In Shopify Admin, under Settings->Payment providers, you can set automatically or manually capture payment for orders, but this setting does not affect Klarna Payments orders in Shopify.  All Klarna Payments orders are set to Paid status in Shopify when the customer places an order using Shopify’s Hosted Payment SDK.    Shopify orders are only captured in Klarna (and subsequently settled to the merchant) when the order is fulfilled in Shopify (or when the order is captured manually via the Klarna Merchant Portal). 

If desired, you can configure the Order Processing setting "After an order has been paid" for auto-fulfill.  This setting is found at Settings->Checkout->Order Processing.  If set, orders are automatically fulfilled in Shopify and hence also Klarna orders will be auto-captured.  Be aware that this will affect all future orders within your Shopify store.

Alternatively, if necessary, merchants can capture Klarna orders directly in the Klarna Merchant Portal, but this action will not update the Shopify order data and will cause Klarna data and Shopify data to be out of sync and could result in unintended updates, e.g. duplicated captures or refunds.

When shipping an order, if a tracking number and carrier are entered in the Shopify order, that tracking information will be sent to Klarna, either on fulfillment or if the information is added after fulfillment.

As covered in the Klarna merchant contract, Klarna only pays merchants for captured orders.  Merchants should ensure that Klarna orders are shipped, fulfilled, and captured prior to the expiration of the Klarna order (expiration time frame depends on your Klarna contract, e.g. 28 days).   Klarna order expiration is merchant and regional specific (e.g. https://www.klarna.com/uk/business/merchant-support/what-does-an-expired-order-mean/), thus please refer to your Klarna contract for more details.

To avoid expired orders (per section above), if applicable and available for the order, if you are unable to ship the order before the order expires, Klarna order authorization may be able to be extended in the Klarna Merchant Portal. The Klarna order's authorization time cannot be extended within the Shopify store admin.

When an order is partially fulfilled, the total shipping charge is captured in Klarna when the first order line item is fulfilled in Shopify.  The appropriate percentage of tax is captured with each partial fulfillment according to the line items that are fulfilled, except for orders with multiple tax rates; for those orders, all tax is captured on the first fulfillment.  The Klarna Payments for Shopify code can’t match which tax rates correspond to which order line items since tax rates in Shopify aren’t associated with specific order line items.  If unfulfilled order line items are refunded, the appropriate tax amount will be refunded. 

Discounts are included with the final capture, as shown in example below, except for the case of fully discounted products where for free products, the discount for that product is applied when the free product is fulfilled.  For example, a customer buys 3 order line items of $49.99 each, tax of $11.24, discount of $14.99, and shipping of $15.00, totaling $161.22.   If 1 line item is partially fulfilled, $69.86 is captured ($49.99 line item, $15.00 shipping, & $4.87 tax).  When doing the final capture, the discount is applied (if it is not a free product discount).

To refund an order, navigate to the order in the Shopify admin tool and choose the Refund option, as shown below.

If an order is refunded prior to fulfillment, the Klarna order will either be cancelled (if full refund) or the chosen refund amount will be reduced from the Klarna authorization amount.  

If an order is refunded after fulfillment, the Klarna order will be refunded accordingly.  If the order was partially fulfilled, the Klarna order authorization will first be reduced as available, and then refunded accordingly.

Please note that there is a small time delay (around 5 minutes) after the refund is updated in Shopify admin before the update will be reflected on the Klarna order.