4xx or 5xx status and a JSON body with success set to false. The response field holds a short message.
Status codes
Messages
Validation messages name the field that was rejected, such asInvalid currency, Invalid amount or Invalid expires_at. Each endpoint in this reference lists the messages it can return.
Other messages describe a rule that was broken:
Messages are written for people. Base your code on the HTTP status and on
success, not on the exact text.
Request bodies that are not JSON
A request body that is not valid JSON, or that is sent withoutContent-Type: application/json, is rejected before it reaches the endpoint. That response has a 4xx status and a plain text body instead of the JSON shown above.
Handling failures
400,401,403,404: fix the request. Sending the same request again returns the same error.500and timeouts: wait a moment and try again.
reference you sent before trying again, in case the first request went through.