Error codes
Every failure returns the same envelope — including whether the money moved.
Every failure returns the same envelope. Branch on code, never on the message — messages
change, codes do not.
{
"status": false,
"statusCode": 422,
"code": "INSUFFICIENT_FUNDS",
"message": "Validation failed",
"errors": [],
"details": {},
"timestamp": "2026-12-04T09:00:00.000Z",
"path": "/v1/accounts/{accountId}/payouts"
}status, statusCode, message, timestamp and path are always present. code is present on
failures and is the only field safe to branch on. errors and details carry field-level
specifics where the failure has them.
Successful responses use the same envelope with status: true and your payload under data.
Did the money move?
Every money-path failure states its ledger effect — read from the double-entry ledger, not guessed from the provider.
| Code | HTTP | Ledger effect | What to do |
|---|---|---|---|
INSUFFICIENT_FUNDS | 422 | Nothing posted | Available excludes holds. Read available, not balance. |
PAYOUT_INITIATION_FAILED | 422 | Fully reversed | Provider declined definitively. Account re-credited, levy refunded. Safe to retry with a new idempotency key. |
DAILY_LIMIT_EXCEEDED | 403 | Nothing posted | CBN daily debit cap. Resets midnight WAT. |
ACCOUNT_CLOSED | 422 | Nothing posted | Debits refuse. Credits still land. |
WITHDRAWAL_LOCKED | 422 | Nothing posted | A savings lock is in force. Give notice first. |
A payout left pending is not a failure — and must never be retried.
If we called the provider and could not confirm the outcome, we deliberately do not reverse:
the transfer may be in flight. It stays pending with PROVIDER_INITIATE_UNCONFIRMED, the
allowance stays reserved, and a watchdog resolves it within 24 hours.
A 422 means the money is back. A pending payout means it may be gone. Never infer one from
the other.
Request and authorisation
| Code | HTTP | What to do |
|---|---|---|
INVALID_CURSOR | 400 | The after value wasn't produced here. Restart the walk. |
IDEMPOTENCY_KEY_REUSED | 422 | Same key, different body. The first post stands — fetch it, don't retry. |
IDEMPOTENCY_KEY_REQUIRED | 400 | This endpoint moves money and the header is missing. |
IDEMPOTENCY_KEY_INVALID | 400 | Malformed key. |
KYC_TIER_INSUFFICIENT | 403 | Raise the customer's tier. The response names the tier required. |
KYB_NOT_VERIFIED | 403 | Business customers need KYB before money moves. |
CURRENCY_MISMATCH | 422 | We never convert implicitly. |
MODULE_NOT_ENABLED | 403 | Enable the module in the dashboard. Sandbox has every module on. |
TOO_MANY_REQUESTS | 429 | Back off and retry. |
Authentication failures say nothing about the key
A rejected credential answers identically whether the key was mistyped, revoked, or belongs to the other environment:
{
"status": false,
"statusCode": 401,
"code": "INVALID_API_KEY",
"message": "Invalid API key.",
"timestamp": "2026-12-04T09:00:00.000Z",
"path": "/v1/accounts"
}If you are sure the key is live, check the prefix first — nsk_test_ against a live
expectation fails exactly like a bad key. See Test and live.