Software Engineering ยท APIs & Systems
An operation that produces the same end result no matter how many times it's performed, so retrying it is always safe.
Mental model: Like pressing an already-lit elevator button โ pressing it again doesn't call five elevators.
Example: A payment API where retrying a failed request with the same idempotency key charges the customer only once.
In practice: APIs typically implement this by having the client attach a unique idempotency key, so a retried request with the same key is recognized and safely ignored instead of reapplied.