Process a return and create a refund for the associated order. This endpoint finalizes the return flow by issuing a refund tied to an existing return.
Required fields:
- order_id
- return_id
A successful request that refunds money returns 201 with the created refund details for the specified order. When nothing is refunded, it
returns 200 with process_return_response instead.
For Shopify, what happens to the money is Shopify's suggested outcome for the whole order, the same as financial_outcome of the suggested
refund: the return line items, and the exchange items if any, are first netted against what the order already owes. So a return can refund
less than its items are worth, refund nothing, or leave the customer owing money, with or without exchange items.
Processing a return:
- Send the exchange items in exchange_line_items, together with the return line items in refund_line_items, to process them in one request so
that their prices are netted. - When money is refunded (REFUND), the response is 201 with the refund, return_id, return_status, financial_outcome and exchange_line_items:
the exchange items of the return, with how much of each is processed so far. - When the customer owes money (INVOICE) or nothing is owed either way (EVEN), nothing is refunded and the response is 200 with
process_return_response. For an INVOICE with notify set to true, Shopify's invoice for the order is emailed to the customer. - Shopify closes the return by itself a moment after everything in it is processed, so return_status can still read OPEN.
- When money is refunded and transactions are omitted, the transactions Shopify suggests are used. When Shopify suggests one without a parent
transaction, the request fails with 502 and nothing is processed; send the transactions instead. - Without exchange_line_items, refund_line_items is required and only the return line items are processed. A return that still has exchange
items stays open, and they are listed in pending_exchange_line_items. Processing the exchange items in a later request does not net them with
the return line items processed before: they are then charged in full. - Requests for Shopify are rejected with 400 when the return is not open or when a quantity is more than is left to process, with or without
exchange_line_items, and when transactions are sent and no refund is due. - Custom integrations receive the request as is.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||