error_outline
Error Handling
How PayCrypt reports errors and the HTTP status codes you should handle.
All error responses return a JSON body with an error field. Validation errors also include a details object with per-field messages.
HTTP Status Codes
| Status | Meaning |
|---|---|
| 200 | Success |
| 201 | Created — payment or withdrawal created |
| 400 | Bad Request — validation error or missing parameters |
| 401 | Unauthorized — invalid or missing API key |
| 404 | Not Found — resource does not exist |
| 409 | Conflict — request conflicts with current state |
| 429 | Too Many Requests — rate limit exceeded |
| 500 | Internal Server Error |
Response Examples
jsonValidation Error (400)
{
"error": "VALIDATION_ERROR",
"details": {
"network": ["network is required"],
"amount": ["amount must be a positive number"]
}
}jsonConflict (409)
{
"error": "Request conflicts with the current resource state."
}jsonAuthentication Error (401)
{
"error": "Invalid or missing API key."
}