A payments API that authorizes charges, records them in a double-entry ledger, batches merchant payouts, and reconciles card-processor events through idempotent webhooks.
A money-movement service where correctness and idempotency are the whole game: the ledger must always balance and every retry must be safe.
The fastest way into acme-payments-api: read these 5 files first, in order.
src/charges/chargeService.tsEntry point for authorizing a chargesrc/ledger/ledger.tsDouble-entry posting logic, the money-safety coresrc/webhooks/handler.tsIdempotent webhook reconciliationsrc/payouts/batch.tsNightly payout batchingsrc/db/schema.sqlLedger and charges schema, with constraintsMaster any codebase this fast. Repo Mastery turns a repo into first files, architecture maps, flashcards, drills, and shareable proof.
Master your own repo