Preloader

Response Codes

All API responses include a standard HTTP status code and a JSON body with a type field (success or error). Use both the HTTP code and the type field to handle responses in your integration.

HTTP Status Codes
HTTP Code Status Meaning
200 OK Request successful. Check the type field to confirm success.
400 Bad Request Invalid or missing request parameters. Check the message.error array for details.
401 Unauthorized Missing or expired access token. Request a new token via the authentication endpoint.
403 Forbidden Invalid token, insufficient permissions, or revoked credentials.
404 Not Found The requested resource (payment token, transaction) does not exist.
422 Unprocessable Entity Validation failed. The message.error array contains field-level validation errors.
500 Server Error An internal error occurred on our side. Retry after a short delay or contact support.
Response Body Structure

Success Response

{
  "message": {
    "code": 200,
    "success": [
      "Human readable success message"
    ]
  },
  "data": {
    // Response payload (varies by endpoint)
  },
  "type": "success"
}

Error Response

{
  "message": {
    "code": 403,
    "error": [
      "Human readable error message"
    ]
  },
  "data": [],
  "type": "error"
}
Tip: Always check data.type === 'success' in addition to the HTTP status code, as some error conditions return HTTP 200 with type: 'error'.