Idempotency Key (retry aman) Playground

Rara’s order is retried after its reply is lost on the road: how many times does the gudang book it, with and without an Idempotency-Key? Then a double click…

Why it matters

Networks do fail, and most often after the server has finished its work: only the reply gets lost. With no key, an automatic retry or a panicked double click makes a double order and a double charge. That is why payment APIs (Stripe, and an IETF draft for HTTP) use an Idempotency-Key on every POST that changes something.

The key idea

The network can fail AFTER the server has done its work

Common mistakes

Try it in this playground