← Lessons

quiz vs the machine

Gold1450

System Design

Returns and Refunds Flow

Reversing a fulfilled order safely with restock and refund coordination.

5 min read · core · beat Gold to climb

Running the order backward

A return and refund flow reverses a completed order. It is more than a refund button: it coordinates approval, the physical return, inventory restock, and the money movement, each of which can fail.

The steps

  • Request and authorize: the shopper opens a return, the system checks eligibility and policy windows.
  • Receive and inspect: the warehouse confirms the item arrived in acceptable condition.
  • Restock or scrap: good items go back to available inventory, damaged ones do not.
  • Refund: the payment provider reverses the charge, often only after inspection.

Why ordering matters

Refunding before the item is received invites fraud, so many flows refund only after inspection. Each step emits an event so the order state reflects the return progress, and refunds use idempotency so a retry does not refund twice.

Key idea

Returns reverse the order as a multi step flow, restocking inventory and refunding only after inspection, with idempotent refunds.

Check yourself

Answer to earn rating on the learn ladder.

1. Why do many flows refund only after the item is inspected?

2. What happens to a returned item in acceptable condition?