Skip to main content

Refund an order with a fee

Use this request when you want to charge the customer for a fee when making a refund

Use case​

Part of, or the entire order has been returned by the customer and you want the money to be refunded.

When the order is refunded, the...

  • state of the order will be Activated or Part activated in Walley's system if part of the order is refunded.
  • the funds excluding the fee will automatically be paid out to the customer
  • the returned article(s) and the fee will be a part of the reconciliation report
  • if no payment has been made the customer gets a new invoice with the fee amount

One or more fees can be added, but the total fee amount is not allowed to be greater than the value of the article(s) being returned.

Endpoints used​

Refund order

Example​

The following request will refund the order with id abcdef-12345-1234-5555-6666

POST /manage/orders/abcdef-12345-1234-5555-6666/refund HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
X-idempotency: 03304b06-cb33-4f78-bcea-86cb4b202ba0

{
"amount": 285.0,
"description": "Refund description",
"actionReference": "test-refundref-123",
"items": [
{
"id": "10001",
"description": "Shoes",
"unitPrice": 300,
"quantity": 1,
"vat": 25,
"type": "purchase"
},
{
"id": "fee",
"description": "Return fee",
"unitPrice": -15,
"quantity": 1,
"vat": 25,
"type": "fee"
}
]
}