zenydevelopers

Idempotency

Send the same Idempotency-Key when you retry, and nothing happens twice.

A network error can leave you unsure whether a request arrived. Retrying a payment or a payout blindly could charge or pay twice. The Idempotency-Key header makes the retry safe. It is required on every POST that creates or moves money: create payment, create attempt, create payout and cancel payout.

SituationAnswer
No key on a POST that needs one400 idempotency_key_required
Same key, different body422 idempotency_key_reused. Use a new key for a new request.
The first request is still running409 idempotency_key_in_progress. Retry with the same key after a moment.

Your own reference on a payment is separate: it is your order id, unique in the project. Reusing it with a new key answers 409 duplicate_reference and names the existing payment.