Responses & idempotency
Response formats, safe retries and how to handle uncertain outcomes when moving money.
Response formats
Response shapes differ by section. Each endpoint in the API reference shows its exact responses.
Validation errors return 400 with { "status": "error", "message": "Validation error", "details": [ ... ] }. Corporate endpoints use their own errors[] format.
Idempotency and outcomes
For payouts, the header must be named idempotencyKey. Idempotency-Key is not recognised and returns 400 Idempotency key is required.
Retrying safely
Use a new key for every new transaction. To retry the same transaction after a network error on your side, resend the identical key:
- VTU returns the existing transaction.
- Payouts return
400 Transaction already processed. Check the payout status instead.
Refunds
Definite rejections from a provider are refunded automatically before you get the response.
Timeouts are never refunded automatically, because the provider may have delivered. Shimi reconciles them.
