Partner API
Error Codes
Every error response has the same shape:
{
"success": false,
"message": "Human-readable explanation",
"error_code": "MACHINE_READABLE_CODE",
"request_id": "..."
}Always branch your integration's error handling on error_code, not on message — the message text may be refined over time, the code will not.
Authentication & authorization
These can occur on any endpoint, before your request is even looked at:
| HTTP | error_code | Meaning |
|---|---|---|
| 401 | HTTPS_REQUIRED |
The request arrived over plain HTTP. Every request must be HTTPS — see Authentication. |
| 401 | MISSING_AUTH_HEADERS |
One or more of X-Api-Key, X-Timestamp, X-Signature is missing. |
| 401 | REQUEST_EXPIRED |
X-Timestamp is more than 5 minutes from the server's clock. Check your system clock. |
| 401 | INVALID_API_KEY |
The API key doesn't match any active partner. |
| 401 | INVALID_HOST |
A sandbox key was used on the production host, or a live key on the sandbox host — see Sandbox. |
| 401 | INVALID_SIGNATURE |
The signature didn't match what the server computed — see Authentication for the exact formula. |
| 401 | DUPLICATE_REQUEST |
This exact signed request (same signature) was already processed once, within the last 5 minutes — see Authentication. Build a fresh request (new X-Timestamp, new signature) rather than resending the same one. |
| 403 | IP_NOT_ALLOWED |
Your key has an IP allowlist configured, and this request didn't come from one of those IPs/ranges. |
| 429 | RATE_LIMITED |
You've exceeded your per-partner request limit. Back off and retry — it resets every minute. |
| 403 | COMPANY_PLAN_EXPIRED |
The SACCO behind this key doesn't have an active subscription, so the service is paused. It works again as soon as the SACCO renews. Contact the SACCO. |
| 403 | SCOPE_DENIED |
Your API key is valid, but isn't granted the scope this endpoint requires. |
| 500 | INTERNAL_ERROR |
Something unexpected failed on our side — during authentication or on a read endpoint. Internal details are never echoed back. Safe to retry; if it persists, contact support with the request_id. |
Resource & operation errors
| HTTP | error_code | Where it occurs | Meaning |
|---|---|---|---|
| 404 | ACCOUNT_NOT_FOUND |
balance, statement, disbursements, collections | No active account matches the account_ref you gave, for your SACCO. |
| 404 | OPERATION_NOT_FOUND |
operations | No operation with that id exists for your credential — see Operation Status. |
| 422 | DISBURSEMENT_FAILED |
disbursements | The disbursement couldn't be completed — a currency that doesn't match the account's own (see Disbursements), or another reason in message. |
| 422 | COLLECTION_FAILED |
collections | Insufficient balance, a minimum-balance breach, a currency that doesn't match the account's own (see Collections), or another reason in message. |
| 500 | DISBURSEMENT_FAILED / COLLECTION_FAILED |
disbursements, collections | Same code, different HTTP status: an unexpected server-side failure rather than a business rule. message is a generic "An unexpected error occurred" — internal details are never echoed back, even on our own bugs. Safe to retry with the same idempotency_key. |
| 409 | OPERATION_NOT_CONFIRMABLE |
collections/confirm | Only relevant when the SACCO requires OTP for collections (the default for live partners) — see Collections. The operation isn't awaiting_confirmation. |
| 410 | OTP_EXPIRED |
collections/confirm | The 5-minute OTP window passed before you confirmed. Start a new collection. |
| 422 | INVALID_OTP |
collections/confirm | The submitted code didn't match. Counts toward the 5-attempt lockout. |
| 429 | OTP_LOCKED |
collections/confirm | 5 wrong codes submitted. Start a new collection to get a fresh code. |
Webhook-specific errors
See Webhooks for UNKNOWN_PARTNER, MISSING_SIGNATURE, WEBHOOK_EXPIRED, and OPERATION_NOT_FOUND.
A note on retries
A 5xx-level failure (rare — generally means something went wrong on our side) is always safe to retry with the same idempotency_key on disbursement/collection calls. A 4xx error means your request itself needs to change before retrying — retrying an invalid request unchanged will just get the same error again.