POST /payments, a replay returns the existing batchId with an empty
payouts array rather than repeating the original response payload.
Using idempotency keys
For batch creation endpoints, include anidempotencyKey in the request body:
idempotencyKey:
POST /payments— batch-level keyPOST /external-payments— batch-level key, plus an optional per-paymentidempotencyKey
Behavior
- Choose a unique key per logical operation (for example, a UUID or a stable identifier from your own system).
- Reuse the same key when retrying the same request.
- The first accepted
POST /paymentsrequest for a key establishes the batch’s source account. Reusing that key with a differentsourceAccountIddoes not switch the account. - If you omit the key, the API generates one per request, so retries are not deduplicated — always supply your own key when retry safety matters.
Idempotency keys are most useful when paired with a retry strategy: on a
timeout or
5xx, retry with the same key using exponential backoff with
jitter, and stop after a bounded retry window to avoid retry storms.