Errors
If a request returns a successful 2xx status code, you can assume everything went well.
A 4xx status code means the request failed because of the information you provided. A 5xx status code means something went wrong on our side — our team is automatically alerted when that happens.
Status codes
| Status code | Reason |
|---|---|
200 OK |
Everything went well. |
201 Created |
A new resource was created. |
204 No Content |
The resource was deleted; no body is returned. |
400 Bad Request |
The information provided is invalid; the request failed. |
401 Unauthorized |
Authentication failed — check your secret API key and its mode (Test vs Live). |
404 Not Found |
The resource was not found. |
500, 502, 503, 504 |
Something went wrong on our side. |
Error payload
On a 400 Bad Request, the response body tells you which parameters were invalid:
{
"message": "Your request is invalid.",
"errors": {
"<parameter>": [
"Error message"
]
}
}message— a human-readable summary of the error.errors— a map of each invalid parameter to the list of problems found with it.reason— an optional, shorter machine-readable reason included on some errors.