Grokking Modern API Design Interview
0% completed
Idempotency Keys
A merchant sends POST /payments and the request times out.
Three different things could be true: the service never received it, the service received it and is still working, or the payment was created and only the response was lost.
Without a retry contract, sending again might charge twice, while doing nothing might leave the payment uncreated.
An idempotency key gives both attempts one logical identity.
An idempotency key is a caller-generated value that says, "These deliveries are attempts to perform the same logical operation."
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%