Idempotency is the property of an operation producing the same result whether executed once or many times. In HTTP: GET/PUT/DELETE are idempotent per RFC (a repeated request does not change state). POST is non-idempotent by default but can be made so via an Idempotency-Key header (Stripe pattern). Critical for payments, orders, any "create" endpoints where a network retry must not create duplicates.
Below: details, example, related terms, FAQ.
POST /v1/payments
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
{"amount":100,"currency":"USD"}Network retry: server received the POST, processed it, but the response was lost in transit. The client thinks "it didn't go through, retrying" → duplicate. Idempotency-Key prevents that.
Stripe keeps them 24 hours. Enough for a retry window without bloating the DB.
Yes. Rate limits do not affect idempotency. The request is either allowed and returns data, or rejected with 429 — in both cases state does not change.