Response Format
All CashQ API responses are in JSON format and share a consistent envelope structure.Response Envelope
Every API response includes these top-level attributes:Indicates whether the request was successful. Value will be
true or false.Contains error information if the request failed. Empty string if successful.
Contains the response data for successful requests. Structure varies by endpoint.
Success Response
When a request succeeds,success will be true and the response will include relevant data.
Example Success Response
Success Response Structure
Always
true for successful requestsEmpty string for successful requests
Response data specific to the endpoint (e.g.,
payment_response, balance, status)Error Response
When a request fails,success will be false and the response will include error details.
Example Error Response
Error Response Structure
Always
"false" for error responses (note: string, not boolean)Contains error details
Response Examples by Endpoint
Balance Response
KYC Verification Response
Verified User:Transfer Status Response
Check Transfer Response
Handling Responses
Checking Success
Always check thesuccess field first to determine how to process the response:
Error Handling
Use the error code for programmatic error handling:HTTP Status Codes
The CashQ API uses standard HTTP status codes:| Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 404 | Not Found | Resource not found |
| 500 | Internal Server Error | Server error occurred |
Even when the HTTP status is 200, always check the
success field in the response body to determine if the operation succeeded.Best Practices
Always Check Success
Check the
success field before processing response dataHandle Both Types
Account for
success being both boolean and stringUse Error Codes
Use error codes for programmatic error handling
Log Responses
Log full responses for debugging and monitoring
