# Idempotency

Idempotency-Key is mandatory on mandate-consume, recommended on process-biovital-transaction, and does not apply to mandate-check, which moves nothing.

> `Idempotency-Key` is **mandatory** on `mandate-consume`. Without it the call is refused with `reason: idempotency_key_required`, because a network timeout would otherwise become a double charge.

## The key

- 8–200 characters, chosen by you, unique per intended operation.
- The same key replayed returns the original consumption with `idempotent_replay: true` and debits exactly once.
- A different key for the same intent is a second operation. Derive the key from your own action reference.

```
-H "Idempotency-Key: booking-88213-attempt-1"
```

## Where else it applies

Strongly recommended on `process-biovital-transaction`, where a replay returns the original body with the response header `Idempotency-Status: replayed`.

## Where it does not apply

It does not apply to `mandate-check`. Check does not move anything, so there is nothing to deduplicate. Earlier documentation claimed the opposite; that was the single most dangerous error in it. See [mandates/check](/mandates/check).

## Why the ledger is append-only

Consumptions are rows, not a decremented balance column. A counter loses the reason, and the reason is what an audit needs: who acted, under which mandate, against which action reference, at what time.
