Issue a refund (full / line-item / partial-amount) + a credit note
POST
/admin/v1/orders/{orderId}/refunds
const url = 'https://your-store.example.com/admin/v1/orders/example/refunds';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"reason":"example","items":[{"orderItemId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","quantity":1,"restock":true}],"amount":1,"restock":true,"idempotencyKey":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-store.example.com/admin/v1/orders/example/refunds \ --header 'Content-Type: application/json' \ --data '{ "reason": "example", "items": [ { "orderItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "quantity": 1, "restock": true } ], "amount": 1, "restock": true, "idempotencyKey": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” orderId
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
reason
string
items
Array<object>
object
orderItemId
required
string format: uuid
quantity
required
integer
restock
boolean
amount
integer
restock
boolean
idempotencyKey
required
string
Example generated
{ "reason": "example", "items": [ { "orderItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "quantity": 1, "restock": true } ], "amount": 1, "restock": true, "idempotencyKey": "example"}