All errors follow general REST principles. Included in the body of any error response (e.g. non-200 status code) will be
an error object of the form:
Parameter | Value |
---|---|
code | The HTTP error status returned |
message | The detailed description of the error. |
errors | list of fields in case of a validation error |
In case of a 422 error, an errors property will be available in the error object with the name of the affected fields as
keys and an array of messages as values respectively. An example is shown below:
{
"code": 422,
"message": "The given data was invalid.",
"errors": {
"order_id": [
"The order id has already been taken."
]
}
}
This API uses the following error codes:
Error Code | Slug | Type | Potential causes |
---|---|---|---|
400 | bad_request | Bad Request | Malformed request |
401 | unauthorized | Forbidden | Trying to access a payment not belonging to you |
403 | forbidden | Forbidden | Invalid or missing token |
404 | not_found | Not Found | The specified resource could not be found |
422 | validation_failed | Unprocessible Entity | Invalid payload or missing fields |
429 | too_many_requests | Too Many Requests | The API is rate limited to 60 request within 1 minute |
500 | server_error | Internal Server Error | We had a problem with our server. Contact support |