# Idempotency Payment creation endpoints require an `X-Idempotency-Key` header. GoDigital compares the incoming **idempotency key** and a **hash of the request**: | What you send | What happens | | --------------------------------------------- | ---------------------------------------------- | | New key | A new transaction is created. | | **Same key + same payload** | The **original** transaction result is returned. No duplicate payment. | | **Same key + different payload** | Rejected with `PGW-1004`. | ## Recommendations - Generate one key per **business operation**, and keep it when you retry after a timeout or network error. - Generate a new `requestId` and a new key for every **new** payment. - Use a unique business `reference` per payment where possible. - Store `requestId`, `reference` and the returned `transactionId` together so you can reconcile.