Our error structure and status codes

Status Codes

We will always return one of the following:

CodeNameDescription
200OKEverything worked as expected
400Bad RequestSomething went wrong. Often a required param is
missing
401UnauthorizedNot a valid API Key
402Request failedParams were right, but something failed, also used to rejected charges
404Not foundRequested item doesn't exists
422Unprocessable EntitySome param is invalid
500Server ErrorSomething went wrong on our servers
501Server ErrorFeature not available yet
errors: [{
  type: "The error type",
  message: "The description of the problem"
}]
errors: [{
  type: "The error type",
  message: "The description of the problem"
}, {
  type: "Another error",
  message: "Some other error"
}]

📘

Our error messages always follows this format

🚧

Attention!

We may return errors not listed above, so don't rely on the errors. Check the content of the JSON and messages!