Refunds
Money given back on an order, for items, shipping or both, with the items optionally put back into stock.
Endpoints#
- GET
/orders/{order_id}/refunds.jsonList an order's refunds - GET
/orders/{order_id}/refunds/{id}.jsonGet a refund - POST
/orders/{order_id}/refunds/calculate.jsonCalculate a refund - POST
/orders/{order_id}/refunds.jsonRefund an order
Paths are relative to https://store.weftgrid.com/api/admin/2026-10. The examples read the token from $STORELOOM_TOKEN and ids from variables like $ORDER_ID.
The refund object#
What the endpoints below return for one refund, and the payload of the refunds/create webhooks.
{
"id": "cm2rfnd0001",
"order_id": "cm2ordr0001",
"amount": "58.00",
"shipping_amount": "0.00",
"note": "Returned: too small",
"restock": true,
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1,
"subtotal": "58.00"
}
],
"created_at": "2026-10-25T14:00:00.000Z"
}List an order's refunds#
/orders/{order_id}/refunds.jsonread_orderscurl "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/refunds.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{
"refunds": [
{
"id": "cm2rfnd0001",
"order_id": "cm2ordr0001",
"amount": "58.00",
"shipping_amount": "0.00",
"note": "Returned: too small",
"restock": true,
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1,
"subtotal": "58.00"
}
],
"created_at": "2026-10-25T14:00:00.000Z"
}
]
}Get a refund#
/orders/{order_id}/refunds/{id}.jsonread_orderscurl "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/refunds/$REFUND_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{
"refund": {
"id": "cm2rfnd0001",
"order_id": "cm2ordr0001",
"amount": "58.00",
"shipping_amount": "0.00",
"note": "Returned: too small",
"restock": true,
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1,
"subtotal": "58.00"
}
],
"created_at": "2026-10-25T14:00:00.000Z"
}
}Calculate a refund#
/orders/{order_id}/refunds/calculate.jsonread_ordersWhat a refund of these items and shipping would be, without making it: each line's amount (its price after discounts, plus its tax when tax was added on top), the suggested total (capped at what's left to refund) and which payments it would go back to. shipping takes { amount } or { full_refund: true }.
{
"refund": {
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1
}
],
"shipping": {
"amount": "0.00"
}
}
}curl -X POST "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/refunds/calculate.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"refund": {
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1
}
],
"shipping": {
"amount": "0.00"
}
}
}'Example responseShowHide
{
"refund": {
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1,
"subtotal": "58.00"
}
],
"shipping": {
"amount": "0.00",
"maximum_refundable": "6.00"
},
"amount": "58.00",
"maximum_refundable": "122.00",
"currency": "USD",
"transactions": [
{
"kind": "suggested_refund",
"parent_id": "cm2tran0001",
"gateway": "manual",
"amount": "58.00"
}
]
}
}Refund an order#
/orders/{order_id}/refunds.jsonwrite_ordersrefund_line_items lists { line_item_id, quantity }; shipping takes { amount } or { full_refund: true }. amount overrides the suggested total (see calculate), for example to keep a restocking fee.
restock (default false) puts the refunded items back into stock. Shopify's per-line restock_type (no_restock, return, cancel) works too, when it's the same on every line.
Money goes back to the order's payments automatically: card and cash payments first, gift cards last (credited back onto the card). Card refunds go through the store's Stripe account. notify (default false) emails the customer, unless the store has turned that email off. Fires refunds/create, order_transactions/create and orders/updated.
{
"refund": {
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1
}
],
"restock": true,
"note": "Returned: too small",
"notify": true
}
}curl -X POST "https://store.weftgrid.com/api/admin/2026-10/orders/$ORDER_ID/refunds.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"refund": {
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1
}
],
"restock": true,
"note": "Returned: too small",
"notify": true
}
}'Example responseShowHide
{
"refund": {
"id": "cm2rfnd0001",
"order_id": "cm2ordr0001",
"amount": "58.00",
"shipping_amount": "0.00",
"note": "Returned: too small",
"restock": true,
"refund_line_items": [
{
"line_item_id": "cm2line0001",
"quantity": 1,
"subtotal": "58.00"
}
],
"created_at": "2026-10-25T14:00:00.000Z"
}
}