Responses And Errors

Successful API responses are wrapped in a consistent envelope.

{
  "status": true,
  "message": "Success",
  "code": 200,
  "data": {}
}

For create operations, code is usually 201. For successful reads, code is usually 200.

Error Shape

Errors use the same top-level structure, with status set to false.

{
  "status": false,
  "message": "Bad Request",
  "code": 400,
  "data": "amount must not be less than 1"
}

Validation errors may place the field-level reason in data. Build your integration around the HTTP status code and the status boolean, then show or log message and data for debugging.

Common Status Codes

CodeMeaningWhat To Do
200Request completed successfully.Read the returned data.
201Resource or action created successfully.Store returned identifiers and references.
400Invalid request.Check required fields, enum values, and data types.
401Invalid or missing API key.Check x-api-key and environment.
403Authenticated but not allowed.Check business permissions or endpoint access.
404Resource not found.Confirm ID, reference, mode, and ownership.
422Request understood but cannot be processed.Check business rules such as unsupported currency or insufficient balance.
500Server error.Retry safely where appropriate and contact support with the request reference.

Safe Retry Guidance

Retry read operations safely. For create or payment operations, send your own unique reference where the endpoint supports it so retries can be reconciled without creating confusion in your system.