System Design
20. System Design Case StudiesAnimated
Online Payment Gateway (Stripe)
Take payments reliably.
The idea
Idempotent APIs, a ledger, fraud checks and integration with card networks.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
The merchant creates a payment with an idempotency key.
- step:
- 1/4
- at:
- Merchant
1/9
The green dot is a request moving through the system.
Step by step
- 1Client submits a payment with an idempotency key
- 2Run fraud checks
- 3Authorise with the bank
- 4Record in the ledger and notify
Where it is used
Financial design.
Watch out for
Never lose or double-charge. Use idempotency and a ledger.