Skip to main content
VTULab uses standard HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with VTULab’s servers.

HTTP Status Codes

CodeDescription
200 - OKEverything worked as expected.
400 - Bad RequestThe request was unacceptable, often due to missing a required parameter.
401 - UnauthorizedNo valid API key provided.
403 - ForbiddenThe API key doesn’t have permissions for the request or IP is not whitelisted.
404 - Not FoundThe requested resource doesn’t exist.
422 - Unprocessable EntityValidation errors (e.g. invalid phone number format).
429 - Too Many RequestsToo many requests hit the API too quickly.
500, 502, 503, 504 - Server ErrorsSomething went wrong on VTULab’s end.

Error Response Structure

When a request fails, we return a JSON object containing the error details.
{
  "status": false,
  "message": "The given data was invalid.",
  "errors": {
    "phone_number": [
      "The phone number must be exactly 11 digits."
    ]
  }
}

Field Definitions

status
boolean
Always false for error responses.
message
string
A high-level summary of the error.
errors
object
An object containing field-specific validation messages. The keys represent the field names, and the values are arrays of error strings.

Handling Errors

Validation Errors (422)

These occur when the data you sent doesn’t meet our requirements. Always check the errors object for specific details.

Authentication Errors (401/403)

Double-check that your API key is correctly formatted in the header and that your server’s IP address is whitelisted in the dashboard.

Rate Limiting (429)

If you hit our rate limits, slow down your requests and implement a retry logic with exponential backoff.
Need help? Contact our support team at [email protected] with your transaction reference or request payload.