Purchase flow

1. Customer clicks Buy

The service checks whether the requested quantity is available.

2. Stock is reserved

If available, an order becomes RESERVED. Its units are held for 2 minutes by default while the customer pays.

3. Reservation ends

Payment succeeds →CONFIRMED
Reserved stock moves to sold.
Cancel / payment fails →CANCELLED / PAYMENT_FAILED
Reserved stock returns to available.
Unpaid at the deadline →EXPIRED
The expiry worker returns stock to available.

Backend activity

No recording
available=5 reserved=0 sold=0
Preset stock

Run a scenario to record backend activity.