Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Returns

The return object and the allowed CRUD operations on the related resource endpoint

Returns are linked to one specific order. They get created in draft status and become requested when a customer requests to return SKUs from an order. Requested returns can be approved or cancelled. An approved return becomes shipped once it leaves the customer's address (origin). As soon as they reach the available return location (destination), shipped returns can either be marked as received — after which its return line items can be restocked to an inventory location — or, in case of any errors (e.g. the customer sent back the wrong products), be marked as rejected. Received returns can be refunded, in which case, their status becomes refunded.

Returns are still creatable and updatable even when the associated order's fulfillment status is in_progress. If needed, you can also mark a return as received directly from the requested or approved status.

Refunding from a return

Once a return is received, the refund process works in two steps:

  1. Create one or more payment refunds against the order's payment sessions to cover the amount to be returned.

  2. Once the total of succeeded refunds equals or exceeds the estimated_refund_amount_cents, pass the _refund trigger on the return to mark it as refunded.

The estimated_refund_amount_cents attribute provides a suggested refund amount computed from the price and quantity of the returned items. It is a guide — the actual refund amount is determined by the payment refunds you create against the order's sessions.

Last updated