Skip to main content

Requests & Responses

Making a Request

Every request requires two headers:

HeaderValue
x-api-keyYour API key — see Authentication
Content-Typeapplication/json

Response Format

All API responses share a common envelope:

{
"code": 0,
"message": "Success",
"data": {}
}
FieldTypeDescription
codeinteger0 indicates success. Any non-zero value indicates an error.
messagestringHuman-readable description of the result.
dataobjectResponse payload. Shape varies by endpoint — see individual API docs.

Error Handling

When a request fails, the response body contains a message describing the issue. The HTTP status code indicates the category of failure.

HTTP StatusMeaning
400Bad request — invalid parameters
401Unauthorized — missing or invalid API key
404Not found — resource does not exist or has expired
422Unprocessable — request was valid but could not be completed (e.g. invalid redirect URL)
500Server error

Example error response:

{
"code": -1,
"message": "Invalid PAN"
}
tip

Some verification endpoints return code: 0 with an INVALID status inside data rather than an HTTP error — this means the request succeeded but the document being verified is invalid. Check the data field alongside code and message.