Skip to content
Tranzaq

Concepts

Idempotency

Retry safely: send an Idempotency-Key and nothing is created twice.

Networks fail. If your request times out you cannot know whether we received it. An idempotency key lets you send it again without a double payment.

How it works

  • Send an Idempotency-Key header of 8 to 150 characters (a new GUID for each request works well) on every call that creates something: adding a person and creating a batch.
  • The first request with a key does the work and we remember the answer.
  • A repeat with the same key and the same body returns the same answer. The response carries Idempotent-Replayed: true.
  • A request that was rejected (a 4xx) is forgotten, so you can correct it and send it again with the same key.
  • The same key with a different body is refused with 409. Use a new key for a different request.
curl -X POST "https://api.tranzaq.com/api/v1/payout-batches" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: payroll-2026-10" \
  -H "Content-Type: application/json" \
  -d '{ "name": "October salaries", "items": [ … ] }'