Order id
Order Management API (1.0.0)
Request
Create a refund. Read more on Refunds
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. Input values of the operation are disregarded when evaluating the idempotency of the operation, only the key matters.
Description of the refund shown to the customer. Max length is 255 characters.
Order lines for the refund shown to the customer. Optional but increases the customer experience. Maximum 1000 order lines.
Internal reference to the refund. This will be included in the settlement files. Max length is 255 characters.
- Default Server URLhttps://api.kustom.co/ordermanagement/v1/orders/{order_id}/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.kustom.co/ordermanagement/v1/orders/{order_id}/refunds' \
-H 'Content-Type: application/json' \
-H 'Klarna-Idempotency-Key: string' \
-d '{
"description": "string",
"order_lines": [
{
"image_url": "https://yourstore.example/product/headphones.png",
"merchant_data": "Some metadata",
"name": "string",
"product_identifiers": {
"brand": "Intel",
"category_path": "Electronics Store > Computers & Tablets > Desktops",
"color": "Denim blue",
"global_trade_item_number": 735858293167,
"manufacturer_part_number": "BOXNUC5CPYH",
"size": 4
},
"product_url": "https://yourstore.example/product/headphones",
"quantity": 1,
"quantity_unit": "pcs.",
"reference": 75001,
"tax_rate": 0,
"total_amount": 200000000,
"total_discount_amount": 0,
"total_tax_amount": 200000000,
"type": "physical",
"unit_price": 200000000
}
],
"reference": "string",
"refunded_amount": 200000000
}'- Default Server URLhttps://api.kustom.co/ordermanagement/v1/orders/{order_id}/refunds/{refund_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.kustom.co/ordermanagement/v1/orders/{order_id}/refunds/{refund_id}'Refund found.
Description of the refund shown to the customer. Max length is 255 characters.
Order lines for the refund shown to the customer. Optional but increases the customer experience. Maximum 1000 order lines.
Internal reference to the refund that is also included in the settlement files. Max length is 255 characters.
The refund id. Generated when the refund is created.
{ "description": "The item was returned and the order refunded.", "order_lines": [ { … } ], "reference": "string", "refund_id": "b2cb4f2e-2781-4359-80ad-555735ebb8d8", "refunded_amount": 0, "refunded_at": "2025-12-04T15:17:40Z" }