Modeling Money Movement: Ledgers, State Machines, and Exactly-Once Effects
How Stripe models money movement with immutable ledger entries and explicit state machines to guarantee correctness even when networks and services fail.
Category
6 articles
How Stripe models money movement with immutable ledger entries and explicit state machines to guarantee correctness even when networks and services fail.
Why Stripe built its own type checker, Sorbet, instead of rewriting its large Ruby codebase, and how gradual typing let adoption happen incrementally.
How Stripe moves data between database schemas and systems while staying live, using a four-phase dual-write and backfill pattern instead of a maintenance window.
How Stripe layers per-request rate limiting with system-wide load shedding to keep its payments API available when traffic spikes or dependencies slow down.
How Stripe's idempotency key design lets clients safely retry payment requests after a timeout without risking a duplicate charge.
Stripe's approach to API versioning uses per-account pinned versions and request/response transforms instead of forcing every integration onto the latest shape.