Definition
Full definition of idempotency key
If your retry logic re-fires a "create charge" request, Stripe could charge the customer twice without an idempotency key. With one, Stripe sees the same key, returns the original result, and doesn't double-charge. Best practice for any non-idempotent write API. Most modern APIs (Stripe, OpenAI batch, GitHub) support idempotency keys; Tiny Command auto-generates them for retries.
In practice
Idempotency Key examples
Stripe charge with key
POST /v1/charges with header Idempotency-Key: charge-order-12345
Used by
Apps that exemplify idempotency key
See idempotency key in action across real integrations.
FAQ
Common questions about idempotency key
How long do idempotency keys live?
Stripe holds them for 24 hours; OpenAI 60 minutes. Beyond that, the same key creates a new resource.
What should I use as a key?
Something unique to the business event: order_id, task_id, message_id. Don't use timestamps (not unique enough).