Features
Storefront
Returns (RMA)

Returns (RMA)

Customers can request returns on delivered orders. Admins approve/deny, track the return, process refunds, and restock inventory.

Where to find it

Storefront (customer): /account/returns — list of their returns, request new Storefront (per order): "Request Return" button on delivered order detail Admin: /commerce/returns

Customer flow

  1. Customer views a delivered order
  2. Clicks "Request Return"
  3. Selects which items + reason (defective, wrong item, changed mind, etc.)
  4. Adds an optional note
  5. Submits — return is created with status requested and RMA number (format: RMA-YYYYMMDD-####)
  6. Customer receives email notifications as status changes

Admin flow

/commerce/returns shows all returns with status filters. Click a return to:

  • View items + reason
  • Change status (see lifecycle below)
  • Add admin notes
  • Process refund (triggers Stripe/PayPal refund API)
  • Restock inventory back to available

Status lifecycle

requested → approved → shipped_back → received → refunded

     denied
StatusWhat happens
requestedInitial state. Customer gets confirmation email.
approvedCustomer gets approval email with shipping instructions.
deniedCustomer gets denial email. End state.
shipped_backCustomer has sent the items back.
receivedAdmin received and inspected items.
refundedRefund processed. Inventory restocked. Customer gets refund email.

Refund processing

When status → refunded:

  1. Calls Stripe Refund API or PayPal refund (whichever was used for the original order)
  2. Updates order payment_status to refunded or partially_refunded
  3. Restocks inventory (releases reservations, restores quantity_available)
  4. Syncs back to ehs__orders warehouse record
  5. Sends email notification

Webhooks

Each transition fires a webhook: return.requested, return.approved, return.refunded, etc.

Related features