Idempotency
Why idempotency matters whenever requests can be retried: what idempotent means, which HTTP methods are idempotent, idempotency keys for payments and orders with a working implementation, idempotent message consumers, database techniques, and the mistakes that cause double charges.
CodexBash, , 6 min read
A customer taps Pay. The request reaches your server, the card is charged, and then the mobile network drops before the response arrives. The app sees a timeout and does the sensible thing: it retries. Without care, the customer is charged twice. Networks fail in exactly this way all the time, so every system that retries, which is every reliable system, needs operations that are safe to repeat. That property is idempotency, and this article explains how to build it.
Sign in to read the rest
The whole 6 minute article is free with an account, along with every problem, lesson and tutorial. No card.