The screen spins after the tap
At 11:42 a payment request leaves the device. The connection drops before any response comes back. Nobody watching that screen can tell whether the order was created — the silence looks identical for a committed transaction and for a request that never reached application code. Retrying is the only sensible reflex, and it is also the reflex that produces two charges.
An idempotency key is the value that makes the second attempt recognisable as the same piece of work. The caller generates it and attaches it to the request; the server stores enough state to spot a repeat and hand back a result. The mechanics are unglamorous. What decides whether the design holds is scope, lifetime, and the shape of the replayed answer.
What HTTP actually guarantees
RFC 9110 (2022, STD 97) classifies idempotence by method. GET, HEAD, PUT, DELETE, OPTIONS and TRACE are idempotent; POST, PATCH and CONNECT are not. The property says the expected server effect of several identical requests matches the effect of one. Safe and idempotent are two different attributes: GET is both, PUT is idempotent but carries side effects.
A sourcing note belongs here, because this is where copy-paste goes wrong. The method split is confirmed by the IETF draft's own sentence — "Per [RFC9110], the methods OPTIONS, HEAD, GET, PUT and DELETE are idempotent while methods POST and PATCH are not" — rather than by a word-for-word reading of RFC 9110 section 9.2.2, which was not obtained during this research. Cite the classification through the draft; quoting the standard verbatim would need a human check of the original first.
Even taken at full face value, method semantics never deduplicate business operations. An idempotent PUT does not stop a caller from overwriting another caller's state. A non-idempotent POST does not stop a service from accepting a caller-supplied key and making retries harmless. HTTP describes request effects; it has no way of knowing that two order creations are one purchase.
The key is a small contract
The Idempotency-Key header field lives in an IETF Internet-Draft: draft-ietf-httpapi-idempotency-key-header-09, dated 2026-11-21 and expiring 2027-05-25. It is work in progress; RFC status is not among its attributes. That status ought to survive into any documentation mentioning the header.
The draft specifies the value as a Structured Header String, recommends a UUID or comparable random identifier, and forbids sending two such headers in a single request. Uniqueness is defined by the resource owner and implemented by the caller; the same key must never travel with a different payload. Expiry policy is published by the resource, which also owns the whole key lifecycle. No unified TTL exists in the draft. Revision -09 additionally relaxed recording of idempotent behaviour from a MUST to a SHOULD, so a write-up calling that recording mandatory is describing an older text.
| Design question | Where draft-09 puts it | What the vendors actually ship |
|---|---|---|
| Who decides uniqueness | Resource owner defines it, caller implements it | Stripe accepts a caller-supplied value; AWS calls its EC2 version ClientToken |
| How long a key survives | No unified TTL; the publisher documents expiry | Stripe API v1 allows removal after at least 24 hours |
| What a repeat returns | Recording idempotent behaviour is SHOULD in -09 | Stripe v1 replays the saved first response, including a 500; AWS returns a semantically equivalent response |
| Payload drift | Optional fingerprint (MAY), with several matching strategies | Stripe compares parameters; AWS returns a parameter-mismatch validation error |
| Key format | Structured Header String, UUID recommended | Stripe suggests a V4 UUID or comparable entropy, capped at 255 characters |
The edges worth arguing about
Two numbers get blended together constantly. The 24-hour retention belongs to Stripe API v1. The IETF draft fixes no TTL at all. Under v1 the first response is stored and replayed even when it is a 500 — certainty is gained, but if the underlying fault was transient and a retry could have succeeded, that certainty gets in the way. Stripe API v2 behaves differently: a retry does not repeat an operation that already succeeded and tries to resume failed work. Mixing the two generations produces guidance that matches no real service.
AWS is equally specific and equally local. ClientToken is the name used in EC2; treating it as a general-purpose HTTP header misstates the source. The requirement there is that recording the token and all associated changes commit atomically, and that a repeat returns a semantically equivalent response rather than a bare ResourceAlreadyExists — the latter leaves the caller unsure whether the original request ever completed. Semantic equivalence allows an instance to move from pending to running; it does not demand byte-identical bodies. Reusing the identifier with different parameters produces a validation error.
A fingerprint, where present, catches the same key paired with a different body. It is optional. A resource without one treats any reuse of the key as a repeat, which is precisely why the key must never be recycled for another payload. Coverage matters as well: a fingerprint computed over selected fields will miss a change outside those fields. And none of this is exactly-once delivery or a distributed transaction. The key suppresses duplicate side effects. Making two systems agree atomically sits outside its reach.
Where this lands
A shared runtime and an open catalog change the cost structure of this problem without changing the problem. A capability reaching several host surfaces through one build carries one implementation of key generation, scope rules and replay behaviour, instead of a separate interpretation per integration. The draft is still a draft, TTLs still differ by vendor, and the fingerprint is still optional — those facts travel with the contract, and a team reading them honestly will not mistake a saved 500 for a completed purchase. Cross Mini App is one place where that reuse becomes concrete: one set of retry and replay rules, exercised wherever the host allows the capability to run.