Every order Zinc places spends real money. An idempotency key is your guarantee that one logical purchase results in one charge — no matter how many times the request is sent. Use one on every order. It’s the only thing standing between a flaky network, a buggy retry, or an over-eager client and a duplicate order on a real card.Documentation Index
Fetch the complete documentation index at: https://www.zinc.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
How it works
Include anidempotency_key in your request body. It can be any string up to 36 characters — a UUID is the right choice. Zinc enforces uniqueness on this key, so at most one order will ever exist for it, no matter how many times you send the same request.
Use a fresh key for each new order. The same key always means the same order.
Behavior on retry
If you send a request with a key that has already been used, Zinc returns analready_exists error rather than replaying the original response:
metadata) and move on.
Example
When to retry
- Retry on network problems and Zinc service errors. Timeouts, connection resets, and
5xxresponses are usually transient. Use the same idempotency key and back off between attempts (e.g. 1s, 2s, 4s, capped at a few tries). - Don’t retry on errors caused by your request. Bad input, bad auth, insufficient funds — these will fail the same way next time. Fix the cause, then submit a new order with a new key.
already_exists response on a retry means the original attempt succeeded. Treat it as success and stop retrying.
Anti-patterns
These are real patterns we’ve seen cause duplicate orders or hide real failures.Retrying every error
Treating every non-success response as retryable hides bugs in your integration. Auth, validation, and payment errors are deterministic — the next attempt will fail the same way.Changing the key per attempt
Every one of these defeats idempotency:Treating a duplicate-key response as failure
Analready_exists response on a retry means the original request succeeded. Surfacing it as an error — or retrying with a new key — turns a successful order into a duplicate.

