Core concepts
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
requestIdand a new key for every new payment. - Use a unique business
referenceper payment where possible. - Store
requestId,referenceand the returnedtransactionIdtogether so you can reconcile.
Last modified on

