Idempotency is supported for transfers and wire withdrawals (any POST operations via the INDX API).
How Idempotency Works
Idempotency is implemented using the optional X-IDEMPOTENCY-KEY header:- Include a unique UUID in the
X-IDEMPOTENCY-KEYheader when making a POST request - If the request fails or times out, retry with the same idempotency key
- The server will execute the operation only once, even if you send multiple requests
- Duplicate requests within 24 hours return a 409 conflict response
- Safe retry logic for network failures or timeouts
- Prevention of duplicate transfers or withdrawals
- Idempotent behavior for critical financial operations
Using the Idempotency Key
TheX-IDEMPOTENCY-KEY header is optional. When provided, it must be a valid UUID (RFC 9562 format).
Generating an Idempotency Key
Making an Idempotent Request
Retry Behavior
Successful First Request
When a request with a new idempotency key succeeds:Duplicate Request Detection
If you retry the same request with the same idempotency key within 24 hours:Complete Retry Example
Error Responses
Invalid UUID Format
If theX-IDEMPOTENCY-KEY header contains an invalid UUID:
69de51e7-c587-44ce-a4e2-2f6ec330bfdf(UUID v4 with hyphens)69de51e7c58744cea4e22f6ec330bfdf(UUID without hyphens)
Best Practices
Generate Idempotency Keys Client-Side
Always generate UUIDs on the client before making requests:Use Idempotency for All POST Requests
Include idempotency keys for all transfers and wire withdrawals to ensure safe retry behavior:Store Keys for Audit Trail
Log idempotency keys with your transactions for debugging and reconciliation:Handle 409 Responses Appropriately
A 409 response means the operation already succeeded:Idempotency Key Expiration
Idempotency keys are valid for 24 hours. After 24 hours:- The same key can be reused (though this is not recommended)
- A new request with the old key will be processed as a new operation
Without Idempotency Keys
Requests without theX-IDEMPOTENCY-KEY header will process normally:
- No duplicate detection occurs
- Each request creates a new operation
- Retrying may result in duplicate transfers