Skip to main content
POST
Refund Order

Refund Order

Refunds an order through the same engine the merchant admin and the POS use: the amount is validated against the order’s refundable balance, the money leg runs first (a declined gateway refund moves nothing), accepted lines are restocked only after the money moved, financial_status / the refunded total roll forward, and refunds/create fans out to every app subscribed to it. Requires the write_orders scope.

Request

Body

The refund wrapper is optional — the same fields are accepted at the top level. Shopify’s own refund body is accepted as-is too: refund_line_items[{ line_item_id, quantity, restock_type }] (only lines whose restock_type is not no_restock are restocked), transactions[{ amount }] (summed into amount) and note (as reason).
number
Amount to refund in the order’s currency. Omit it to refund the whole remaining balance. Must not exceed the refundable balance (total_price minus what was already refunded).
string
Free text, stored on the refund ledger and the staff audit entry.
string
default:"original"
Where the money goes:
  • original — back to the card or account the order was paid with, through the gateway. Available for the gateways LaunchMyStore refunds through (see Refunds by payment method); any other payment method returns 400 with what to do instead.
  • store_credit — records the refund on the order without moving money. Use it when your app issues the value itself, e.g. as a gift card.
  • manual — the shopper was paid back outside LaunchMyStore: in the gateway’s own dashboard, by bank transfer, in cash at the counter. Records the refund on the order; no money moves and no till movement is posted.
boolean
default:"false"
Put the refunded lines back into inventory. With line_items, only those lines (and quantities) are restocked; without, every line on the order. When restock is false (the default), nothing is restocked — line_items then only describe the refund.
array
[{ id, quantity }] — the line items (their line_items[].id from the order) this refund covers; used to limit the restock. variant_id (numeric id or UUID) or product_id (numeric id or UUID) is accepted in place of id.

Refunds by payment method

An order that was never paid — still pending, or cancelled before its payment went through — has nothing to refund: every refund_to returns 400.

Response

Returns 201 with a bare refund object (no envelope), like every other /api/v1 resource.
object

Errors

Line-item price values on FX-converted orders (an order placed in a currency other than the store’s base currency) are returned in the order currency, so a refund computed from line_items[].price × quantity always fits the refundable balance.