> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplepay.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Prevent duplicate operations

> Use Idempotency-Key to repeat mutations without duplicating business effects.

An idempotency key binds one business command to one result. Reuse it when you repeat the same request after a timeout.

## Send a stable key

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
Idempotency-Key: order_1001_checkout_v1
```

Derive the value from your system ID and action. Do not create a random timestamp for a retry of the same command.

## Keep the same body

SimplePay compares the request fingerprint. The same key with different parameters returns a conflict.

| Case                        | Expected result                                               |
| --------------------------- | ------------------------------------------------------------- |
| Same key and body           | Returns the original result or converges on the same resource |
| Same key and different body | `409 idempotency_conflict`                                    |
| New key                     | Executes a new command                                        |

Reuse the key for timeouts, `429`, and retryable errors. Correct validation failures before sending another command.
