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:

ParameterValue
codeThe HTTP error status returned
messageThe detailed description of the error.
errorslist 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 CodeSlugTypePotential causes
400bad_requestBad RequestMalformed request
401unauthorizedForbiddenTrying to access a payment not belonging to you
403forbiddenForbiddenInvalid or missing token
404not_foundNot FoundThe specified resource could not be found
422validation_failedUnprocessible EntityInvalid payload or missing fields
429too_many_requestsToo Many RequestsThe API is rate limited to 60 request within 1 minute
500server_errorInternal Server ErrorWe had a problem with our server. Contact support