Idempotency-Key header on a supported request, Thiqwave stores the result of that request and returns the same response for any subsequent request made with the same key — without executing the operation a second time.
How to Use Idempotency Keys
Add theIdempotency-Key header to your request with a unique string value. A UUID v4 is the recommended format.
Supported Endpoints
The following endpoints support idempotency keys:| Endpoint | Description |
|---|---|
POST /v1/transactions | Initiate a payment or transfer |
POST /v1/accounts | Create a new business account |
POST /v1/compliance/kyb | Submit a KYB verification request |
GET, PATCH, or DELETE requests — those operations are either read-only or naturally safe to repeat.
How It Works
When you send a request with anIdempotency-Key:
- Thiqwave checks whether a request with that key has already been processed.
- If no prior request exists with that key, the request is executed normally and the result is stored against the key.
- If a matching request already exists, Thiqwave returns the stored response immediately — the operation is not executed again.
Conflict Response
If you send the sameIdempotency-Key with a different request body, Thiqwave returns a 409 Conflict error:
409 due to a key conflict, generate a new key and resubmit only if you intend to create a new, separate operation.
Best Practices
- Generate one key per operation, not per session. Each distinct operation (e.g. each payment) should have its own unique key. Do not reuse a key for a second, unrelated request.
- Use UUID v4. It is statistically unique, widely supported, and trivial to generate in any language.
- Store the key alongside your operation record. Before sending a request, persist the idempotency key to your database. This allows you to retry with the exact same key if the request times out, and to correlate the result with your internal records.
- Do not retry on
4xxerrors other than429. If a request fails with a validation error (422), fix the payload and generate a new idempotency key — retrying with the original key and a corrected payload will result in a409 Conflict.