Status Codes

These are all the status codes used by Payable's API, along with a brief description and some possible solutions for status codes indicating errors.

Status CodeDescriptionPossible solutions
200 - OKEverything worked as expected.
201 - CreatedThe request to create the resource has worked as expected, and the resource has been created and we will return a link to where the resource can be found.Follow the link returned to check the status of your request.

The response is usually accompanied by a link you can follow to get the status of your request.
202 - AcceptedEverything worked as expected, but we need time to process the request and get back to you with a result (such as though a webhook).The request result will be returned at a later time. Payable will usually use a web hook to return the results.
401 - UnauthorizedNo valid Bearer token or API key provided.Check that you have supplied a bearer token or API key in the request header, and that the header name is correct.

Check the token has not expired.

Check the API key has not been revoked.
403 - ForbiddenThe bearer token or API key doesn't have permissions to perform the request.Check that you have the correct permissions to complete the request.
404 - Not FoundEverything worked as expected, but we could not find the requested resource.Make sure that the requested resource identifier is correct.
422 - Unprocessable EntityPayable understands the content type of the request and the syntax is correct, but the problem was just in data provided within the body.

The returned response should indicate what is the issue, and a brief description.
This request should not be repeated without modification.

This could indicate an issue with a json property. Such as a missing or empty field, or by not meeting a validation constraint (e.g supplying a template id which is not a valid id).

Check the contents of the request body to make sure everything provided is what is expected in the request.
429 - Too Many RequestsToo many requests hit the API too quickly.We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server ErrorsSomething went wrong on Payable's end.These are rare errors as it's something on our end. Unfortunately there is nothing that you can do here on your own to resolve the issue, but to retry at a later time.