Idempotency-Key header.
How it works
- The first request with a key runs normally, and its response is stored.
- A retry with the same key and the same body returns the stored response. It does not run again. The replayed response carries the header
Idempotent-Replayed: true. - Reusing a key with a different body is refused with HTTP
409, code4211. - If the first request is still running, a retry is refused with HTTP
409, code4212. Wait, then retry.
Supported endpoints
Idempotency-Key applies to the endpoints that move money or change a card:
card/createcard/depositcard/withdrawcard/freezecard/unfreezecard/cancel
An internal error (
9999) is also stored. If its outcome is unknown, check the card or withdrawal state first, and then retry with a new key if needed.