hardDesignMidSeniorStaff
Design the checkout flow for a marketplace with multiple sellers per order.
7 min readUpdated 2026-08-15
Answer
Short answer
Persist the order in a pending state before you touch the payment gateway, quote tax and shipping per seller shipment, authorise once behind an idempotency key, and commit the remaining steps through a transactional outbox and a saga whose compensations void the authorisation and release reserved stock.
Was this answer helpful?
Likely follow-ups
- The buyer's card authorises for two of three sellers. What does the customer see, and what do you do with the money?
- Where do you capture, and what changes if one seller ships in two days and another in three weeks?
- How do you handle a partial refund when the platform fee has already been taken?
- The tax service times out at quote time. Do you block checkout, and what do you tell the customer?
Related questions
- A teammate says a saga can just roll everything back if step four fails. What is wrong with that, and what would you tell them to build instead?hardAlso on saga5 min
- A payment API times out and the client retries. How do you guarantee the customer is not charged twice?hardAlso on payments6 min
- Two people book the last seat at the same moment. Neither is allowed to see a failure after paying. What happens?hardAlso on payments5 min
- Walk me through what happens between a customer order being captured and the service being live on the network.hardAlso on saga5 min