Escrow
Money & ledger
Integer cents, double-entry, Stripe pre-auth when you add a key. Demo still posts a balanced journal.
Loop · Booking hold, capture at completion, payout on demand
Escrow & ledger
Double-entry cents. Demo writes the journal without Stripe. Production refuses if GO_LIVE blockers remain.
- Authorize hold (stripe_pending ↔ platform_clearing).
- Capture splits fees, insurance pool, host payable, optional driver share.
- Refund reverses clearing to the processor.
- Cash-out moves payable to stripe_pending (Connect transfer in production).
backend/modules/payments/domain/ledger.ts
holdAtBooking / captureAndSplit — Zero-sum journals
backend/modules/payments/application/escrow.ts
EscrowService — Stripe when keys exist
backend/shared/golive/status.ts
assertProductionMoney — Go-live gate
Holds debit stripe_pending and credit platform_clearing. Capture spends clearing into platform_fees, insurance_pool, and host_payable. Tests fail if a journal does not sum to zero.
Program books (the three portals) are a separate identity from the trip ledger: $25 driver-paid = $15 host + $8 Period 2 binder + $2 platform. Owner, driver, and /admin/income read lib/reporting/books.ts. Print statements and 1099 worksheets use those totals. Stripe is still the wallet. See /docs/reporting.
| Account | Meaning |
|---|---|
| stripe_pending | Processor / Connect in flight |
| platform_clearing | Escrow while the trip is live |
| platform_fees | Take rate |
| insurance_pool | Period 2 reserve |
| host_payable / driver_payable | What we owe after capture |
| dispute_reserve | Chargeback shelf |