Skip to main content
Network disruptions, timeout errors, or client-side retries can lead to duplicate requests. In financial integrations, retrying a payment without proper safeguards could result in double-charging a wallet or initiating duplicate bank transfers. Tabs provides bank-grade idempotency protection on all mutating financial endpoints, including:
  • POST /v1/payouts (Initiate bank payouts)
  • POST /v1/fx/swap (Execute currency conversions)

How idempotency works

To make a request idempotent, include a unique token in the Idempotency-Key HTTP header:
Tabs also recognizes the alternative header X-Idempotency-Key.

The lifecycle of an idempotent request

  1. First request: Tabs locks the key and executes the transfer. The response is cached in our persistence layer for 24 hours.
  2. Replayed request: If you send an identical request with the same Idempotency-Key within 24 hours, Tabs bypasses processing and returns the cached response immediately.
  3. Replay indicator: Replayed responses include the header:

Code example

Always generate a cryptographically random UUID v4 for each distinct transaction attempt:

Error handling

1. In-flight collision (409 Conflict)

If two requests arrive simultaneously with the exact same Idempotency-Key before the first finishes processing, Tabs rejects the second request:

2. Payload mismatch (422 Unprocessable Entity)

If you send a request with an existing Idempotency-Key but modify the request body (e.g. altering the amount or beneficiary), Tabs prevents accidental confusion and rejects the call: