Errors

This section covers how to handle errors gracefully.


Error Handling

All errors follow a consistent JSON format:

JSON
{
  "error": "Human-readable error description"
}

Common HTTP Status Codes

CodeMeaning
200Request successful
201Resource created / transaction initiated
400Bad request — invalid input or business rule failure
401Unauthenticated — invalid or missing API key
403Forbidden — account lacks developer privileges
404Resource not found
500Internal server error — retry or contact support

Common Error Messages

ErrorCause & Fix
Insufficient balanceFund your wallet before retrying
Airtime service is inactiveThe selected network is currently offline
Invalid or expired promo codeThe promo code has expired or doesn't exist
Developer profile not foundYour account is not yet upgraded to developer
Unsupported service typeservice_type value is not recognized
Missing required fieldsOne of service_type, beneficiary, amount is absent

Rate Limits & Best Practices

  • Rate Limit: 300 requests/minute per API key (subject to change).
  • Always check wallet balance via GET /profile/ before bulk operations.
  • Store reference values from your purchase requests — use them to reconcile transactions if a network error occurs before the response is received.
  • Rotate API keys periodically. Update your configuration immediately after regeneration.
  • Set up webhooks to receive asynchronous updates instead of constantly polling GET /verify/{reference}/.