Developer
Idempotency
Retry any write safely.
Send Idempotency-Key — any unique string, a UUID is ideal — on every POST. If the same key reaches the same endpoint again within 24 hours, you get the original response back (same status, same body) with Idempotent-Replayed: true, and nothing is created twice. A key in flight blocks a concurrent duplicate until the first completes.
bash
curl -X POST https://api.trabalance.com/api/v1/invoices \
-H "Authorization: Bearer tk_live_…" \
-H "Idempotency-Key: 2f6b3e90-1c44-4c1a-9d2b-1e0c7a1f9a55" \
-H "Content-Type: application/json" \
-d '{ … }'⚠️One key, one request
Reusing a key with a different body returns the response to the first body. Generate a fresh key per logical operation and keep it through your retries.
The generated SDKs send a fresh UUID automatically on every write and let you pass your own.