6. Refund a captured order
Orders that have been captured can be refunded. To refund an order, make a POST request to the Refund a capture endpoint.
Payload
Refund order objects require amountIncVat
, amountExVat
, currency
and cart
.
Depending on which product type a refund item has, different validation rules apply.
All product types except for "adjustment" and "surcharge" are validated against cart items of the referenced capture.
Examples
One item fully refunded:
{
"captureId": "a068120f-a4f0-46b7-89cf-4b62e8abcf4c",
"data": {
"order": {
"amountIncVat": 3000,
"amountExVat": 2400,
"currency": "SEK",
"cart": [
{
"productType": "physical",
"reference": "testproduct1",
"name": "Test product",
"quantity": 2,
"quantityUnit": "pc",
"unitPrice": 1200,
"taxRate": 2500,
"discountPercentage": 0
}
]
}
}
}
One item fully refunded and an admin fee applied using the "surcharge" type:
{
"captureId": "a068120f-a4f0-46b7-89cf-4b62e8abcf4c",
"data": {
"order": {
"amountIncVat": 2388,
"amountExVat": 1910,
"currency": "SEK",
"cart": [
{
"productType": "physical",
"reference": "testproduct1",
"name": "Test product",
"quantity": 2,
"quantityUnit": "pc",
"unitPrice": 1200,
"taxRate": 2500,
"discountPercentage": 0
},
{
"productType": "surcharge",
"reference": "Surcharge-1",
"name": "Return shipping fee",
"quantity": 1,
"quantityUnit": "st",
"unitPrice": -490,
"taxRate": 2500,
"discountPercentage": 0
}
]
}
}
}
Goodwill refund using the "adjustment" type:
{
"captureId": "a068120f-a4f0-46b7-89cf-4b62e8abcf4c",
"data": {
"order": {
"amountIncVat": 2875,
"amountExVat": 2300,
"currency": "SEK",
"cart": [
{
"productType": "adjustment",
"reference": "Adjustment-1",
"name": "Damaged item partial refund",
"quantity": 1,
"quantityUnit": "st",
"unitPrice": 2300,
"taxRate": 2500,
"discountPercentage": 0
}
]
}
}
}