Split and escrow payments
Your task
Design split/escrow payments for a marketplace: a single buyer charge of $X must be split among multiple sellers, the platform fee, taxes, and held in escrow until each seller's portion is releasable (e.g. on delivery confirmation, possibly at different times per seller). ~3,000 orders/sec, each splitting across 1–10 sellers. Funds held in escrow must always equal sum of pending releases, and a refund before release must claw back from the right seller's pending amount. How do you model the money so it always balances?
It covers
- Escrow
- Split payments
- Marketplace