Idempotency-Key header and the retry replays the original response instead of running again.
POST · a duplicated debit is the one mistake a retry can make that the buyer notices. Use a UUID v4: one per logical operation, reused on retry.
Behaviour
5xx responses are not cached: the key is released so you can retry. 2xx and 4xx are cached.
Scope
Not the same as externalRef
Idempotency-Key is a per-request token that deduplicates a retried HTTP call, and expires in 24 h. externalRef is your business reference (an order id) · it can appear on several payments and never deduplicates anything.
