Errors
The API uses standard HTTP status codes. There is no custom error envelope — error bodies follow Django REST Framework's default shape.
Validation errors
A 400 response maps each invalid field to a list of error messages:
400 Bad Request
{
"amount": ["This field is required."]
}Authentication errors
401 Unauthorized
{
"detail": "Invalid API key."
}403 Forbidden
{
"detail": "Merchant account is not active."
}Not found
Retrieving a charge that doesn't exist, or doesn't belong to your account:
404 Not Found
{
"detail": "Not found."
}No payment provider configured
If your account's region has no active Mobile Money provider configured, charge creation fails with:
503 Service Unavailable
{
"detail": "No payment provider is currently configured."
}Status code reference
200successoptional | The request succeeded (GET requests). |
201successoptional | The charge was created. |
400client erroroptional | A field failed validation — check the body for which one. |
401client erroroptional | Missing or invalid API key. |
403client erroroptional | The key is valid but the merchant account is not active. |
404client erroroptional | The charge id doesn't exist or isn't yours. |
503server erroroptional | No payment provider is configured for this account. |
None of these responses are retried automatically by the API — if you're writing a client, handle each status explicitly rather than assuming a generic error shape.