Payments
How to design a payment system that charges a customer correctly, exactly once.
Basics
Payment system basics
What a payment service does, who takes part in a card payment, how a payment moves through states, and how to store money safely.
A simple payment architecture
A first architecture, its API and happy path, what happens when a step fails, and how idempotency keys prevent double charges.
Webhooks
How a payment service learns the result when a response is lost: webhooks, eventual consistency, duplicate events and signature checks.
Asynchronous work and the outbox pattern
What has to happen before responding and what can wait, why a message broker helps, and how the transactional outbox keeps events from getting lost.