Idempotency

Why it matters

A network timeout doesn't tell you whether your request succeeded before the connection dropped. If that request was "withdraw £500," retrying it blind can pay a customer twice. The Idempotency-Key header exists so a retry is provably safe.

How to use it

Send a unique value in Idempotency-Key on every POST, PATCH, or DELETE request:

curl -X POST https://api.kwiikpay.io/api/v1/partner/customers/{customerId}/banking/withdrawals \
  -H "X-Api-Key: kwp_live_..." \
  -H "Idempotency-Key: withdrawal-2026-08-09-a1b2c3" \
  -H "Content-Type: application/json" \
  -d '{ "...": "..." }'

The header is required on every mutating call — a request without one is rejected before it reaches any business logic.

What happens on retry

Key format

8–256 visible ASCII characters. Any string that uniquely identifies the action on your side works — a UUID is the simplest reliable choice.