Skip to content

Idempotency

What is Idempotency?

The property that repeating the same intended operation has the same effect as doing it once.

For checkout, the same request twice must produce the same result: one payment, no double charge. Send a unique idempotency key for that payment and reuse it on retries. The server remembers the operation and prevents duplicate effects; it may return the saved response. A new purchase needs a new key, and provider retention limits matter.

When you would use it

Use it when payments, queued tasks, or incoming notifications may be repeated.

Common operations

  • Reuse one operation key across retries.
  • Remember processed operation identifiers to prevent duplicate effects.

Related terms

Where this is taught

Going deeper