Idempotency & Retries
Guarantee exactly-once wallet debits across network timeouts and retries.
Why Idempotency Is Required
Mobile networks and payment rails occasionally encounter transient timeouts. Sending a unique Idempotency-Key (for example a UUID v4 stored per checkout order) lets your server safely retry on network failures without debiting your wallet twice.
Replay vs Conflict Rules
- Same key + identical payload: returns the original saved receipt with no additional wallet charge.
- Same key while first call is still in-flight: returns
409 IDEMPOTENCY_CONFLICT— back off and retry or check/v1/airtime/status/:reference. - Same key + modified phone, network, or amountKobo: returns
409 IDEMPOTENCY_CONFLICTto prevent accidental parameter substitution. - Key format: 8–128 characters matching
[a-zA-Z0-9._:-].