When the API returns an error, it will be classified as one of 4 types, depending on the root cause.
Error Types
gocardless
An internal error occurred while processing your request. This should be reported to our support team with the id, so we can resolve the issue.
invalid_api_usage
This is an error with the request you made. It could be an invalid URL, the authentication header could be missing, invalid, or grant insufficient permissions, you may have reached your rate limit, or the syntax of your request could be incorrect. The errors will give more detail of the specific issue.
invalid_state
The action you are trying to perform is invalid due to the state of the resource you are requesting it on. For example, a payment you are trying to cancel might already have been submitted. The errors will give more details.
validation_failed
The parameters submitted with your request were invalid. Details of which fields were invalid and why are included in the response. The request_pointer
parameter indicates the exact field of the request that triggered the validation error.
Further details about the error can always be found within the error response itself and are all handled by our support client libraries, please find links to further details (including code samples) for each specific library below: