The
Idempotency-Key header is specified but not yet read from the HTTP request in v1. The checkout endpoint generates idempotency keys internally; the refund and cancel endpoints do not currently pass idempotency keys to Stripe at all. This page documents the intended contract so integrations can be written to support the header once it is enforced. Do not rely on client-supplied key deduplication in the current release.Idempotency-Key header is the planned mechanism to let you safely retry any money-side POST without that risk.
Money endpoints this header will apply to
These endpoints perform or reverse a financial transaction:| Method | Path | Operation |
|---|---|---|
POST | /api/v1/hub/{hub_id}/checkout | Start a checkout session (paid or free) |
POST | /api/v1/teams/{team_id}/hubs/{hub_id}/payments/{payment_id}/refund | Refund a payment |
POST | /api/v1/teams/{team_id}/hubs/{hub_id}/subscriptions/{sub_id}/cancel | Cancel a subscription (admin) |
POST | /api/v1/hub/{hub_id}/me/subscriptions/{sub_id}/cancel | Cancel own subscription (member) |
Idempotency-Key will not apply there.
Planned key format
Any sufficiently random string up to 255 characters. A UUIDv4 or UUIDv7 is the recommended format:Intended retry semantics (planned)
Once the header is enforced, the intended behavior is:- Generate a key before sending the request.
- If the request times out or you receive a network error (not an HTTP error response), reuse the same key and retry.
- If you receive an HTTP error with a body (
4xxor5xx), the request reached the server. Inspect the response:4xx— do not retry with the same key; the error is client-side.5xx— you may retry with the same key; the server will deduplicate.
- A repeated request with the same key will return the same response without double-charging.