Response

API response object are always sent in JSON format and it contains at least a status code and a message. The data field is optional depending on the request the being made.

Sample response format

{
    isSuccessful: true, // mandatory string
    code: "00", // mandatory string
    message: "Transaction successful",  // optional
    data: {} // optional
    errors: [] // optional
}
// RESPONSE CODES
Below are the response codes for every response from the API 

SUCCESS = "00"
PENDING = "01"
FAILURE = "99"
BADREQUEST = "400"
UNAUTHORIZED = "401"
SERVERERROR = "500"

Failures usually result in an HTTP status code that is not 200 or 20x series - (i.e 400, 500, 503 e.t.c).

However, it is required to watch out for and check the code property directly in the main response body before you make a decision on whether the transaction has truly failed.

All possible error codes are listed under the codes section below on this page

BASIC/STANDARD HTTP Status Codes:

200 - Successful 400 - For Bad requests 401 - Unauthorised / Authentication / Authorization Issues

422 - Bad requests from request field validation errors

500 - Failure in processing transactions or users requests.

Last updated