Growth glossary
What is an idempotency key?
Short answerAn idempotency key is a unique value sent with an API request so that retrying it returns the first result instead of doing the action twice, for example one charge instead of two.
Worked example
A payment request times out. You retry with the same key and Stripe returns the result of the first request, so the card is charged once.
Why it matters
Networks can fail after the server has acted; without a key, a safe-looking retry can double-charge or create a duplicate order.
Common mistake
Reuse a key only for the same request. Stripe can remove keys once they are at least 24 hours old, so a retry days later counts as a new request.
Source: Stripe API reference: idempotent requests ↗
Field notes that use idempotency key
Part of the Subscriptions & retention playbook.
Founders’ answers: Subscriptions & retention questions (29).
Related terms
FAQ
What is an idempotency key?
An idempotency key is a unique value sent with an API request so that retrying it returns the first result instead of doing the action twice, for example one charge instead of two.
What is an example of idempotency key?
A payment request times out. You retry with the same key and Stripe returns the result of the first request, so the card is charged once.
What is the most common mistake with idempotency key?
Reuse a key only for the same request. Stripe can remove keys once they are at least 24 hours old, so a retry days later counts as a new request.