---
title: "Idempotency"
description: "clientRef on every call that moves money, and the optional Idempotency-Key header."
---

<Info>
  Applies to the new routes.
</Info>

## `clientRef` (required on every call that moves money)

Your own unique reference (for example your order or payout id), unique per account you act on.

| You send | We return |
|---|---|
| A new `clientRef` | `201` and the new resource |
| The same `clientRef` with the same body | `200`, the original resource as it is now, header `Storspay-Replayed: true` |
| The same `clientRef` with a different body | `409 CLIENT_REF_REUSED`, `details.existingId` |
| A call we refused (400, 403, 422) | Nothing is recorded; fix it and retry with the same `clientRef` |

Required on: payouts (and each batch item), transfers (including cash-outs) and escrow actions, conversions, collections, account holders.

## `Idempotency-Key` header (optional, any POST)

Up to 255 characters. For 24 hours, a retry with the same key returns exactly the same response, errors included (server errors are not stored, so you can retry them).

- The same key while the first call is still running returns `409 IDEMPOTENCY_KEY_IN_PROGRESS`.
- The same key with a different request returns `422 IDEMPOTENCY_KEY_REUSED`.

## Retry rule

On a timeout or a 5xx, retry with the same `clientRef` (and the same `Idempotency-Key`, if you use one). You will never pay twice.

## September v1 API: `reference`

On the September v1 API, `reference` is unique per platform. Sending the same `reference` again returns `200` with the original payout and `duplicate: true`. `Idempotency-Key` is honoured the same way.
