idempotency_key_reused
HTTP 409, type idempotency_error.
This Idempotency-Key was already used with a different request body.
Why it happened
A key identifies one operation. Reusing it with different contents is a bug on the sending side that we can detect and you cannot: either the retry changed something it should not have, or two different payments were given the same key.
We refuse rather than choose which body you meant.
How to fix it
Send a new key for every new request, whatever it does, or resend the exact original body to get the original result.
Resending the original body returns the original result only if the original completed. If the
original was refused, or failed, while it was being processed, the same body under the same key
answers idempotency_key_in_flight for up to 24 hours instead.
That page says what to do.
A correct retry repeats the body byte for byte. If your client rebuilds the request -- a fresh timestamp, a regenerated reference -- the retry is no longer the same operation.
Related codes
idempotency_key_in_flight-- the same key and the same body, still runningparameter_missing-- no key at all (param: Idempotency-Key)