+254748651734
info@mekacash.com
PCI-aware secure payments
MekaPayGroup API uses standard HTTP status codes to indicate whether a request was successful or failed. In case of an error, the API returns a structured response with details to help you identify and resolve the issue.
All error responses follow a consistent format:
{
"status": "error",
"code": "invalid_request",
"message": "The request parameters are invalid",
"errors": {
"amount": ["The amount field is required"]
}
}The API uses conventional HTTP response codes to indicate the success or failure of a request:
invalid_request
Request is missing required parameters or contains invalid data.
authentication_error
API keys are missing, invalid, or expired.
permission_error
You do not have permission to perform this action.
resource_not_found
The requested resource could not be found.
rate_limit_error
Too many requests sent in a short period of time.
server_error
An unexpected error occurred on the server.
When a request fails due to validation issues, the API returns detailed information about the specific fields that caused the error.
{
"status": "error",
"code": "validation_error",
"message": "Validation failed",
"errors": {
"email": ["The email field must be a valid email address"],
"amount": ["The amount must be greater than 0"]
}
}Your application should always handle API errors gracefully. We recommend: