What actually runs

Runtime loops

Each loop is implemented, annotated on the source file with @docs, and callable over HTTP.

Click a route to hit the live server. Open the file path in the repo — the comment at the top of that file is the same story in engineer voice.

Loop · Hold at booking, capture at completion, payout on demand

Escrow & ledger

Double-entry cents. Demo writes the journal without Stripe. Production refuses if GO_LIVE blockers remain.

POST /api/v1/payments/holds
  1. Authorize hold (stripe_pending ↔ platform_clearing).
  2. Capture splits fees and payee shares.
  3. Refund reverses clearing to the processor.
  4. Cash-out moves payable to stripe_pending (Connect transfer in production).

backend/modules/payments/domain/ledger.ts

holdAtBooking / captureAndSplitZero-sum journals

backend/modules/payments/application/escrow.ts

EscrowServiceStripe when keys exist

backend/shared/golive/status.ts

assertProductionMoneyGo-live gate

$0 demo: Simulated PaymentIntent. Ledger still balances to zero.Scale: STRIPE_SECRET_KEY + Stripe Connect.