Use the Order management API to refund the items on a captured order.
When your customers return the items they bought and you need to refund that order, use this API call to credit the amount back to your customers.
The following diagram depicts how this API call works:
If you want to learn how to correctly allocate refunds when you deliver in multiple shipments, see the Refund allocation section.
To refund the amount of an order, send a
POST request to the
Include the following in your request:
Klarna-Idempotency-Key : This header will guarantee the idempotency of the operation. The key should be unique and is recommended to be a UUID version 4. Retries of requests are safe to be applied in case of errors such as network errors, socket errors and timeouts.
refunded_amount (required): the total order amount to be refunded. It must be less or equal to the captured_amount from the order capture
reference (optional): Internal reference to the refund. This will be included in the settlement files.
description (optional): text to add details of the refunds. Your customers can see this description
order_lines (optional): list of details associated with this refund. We highly recommend you send order lines as they allow us to locate the refund to the right capture (consumer invoice). Order lines are also helpful for your customers to visualize the refunded amount in the Klarna app
If the request is successful, you'll receive a
201 Created response, including
location as HTTP response headers.
If your request contains errors, you'll receive an error response. Make sure the order is already captured and the
order_id is correct.
You can use the
correlation_id and the
order_id values to troubleshoot the call in the Merchant portal logs section.
Ready to send this request? See the API reference of this call.