Connect API
Errors
How the API reports a request it could not carry out.
Failed requests return an errors array. Each entry carries an error_code, the response_code, a status_text and, when available, a human readable description and a recoverable flag.
{
"errors": [
{
"status_text": "Incomplete",
"error_code": "example_error_code",
"response_code": 422,
"description": "What went wrong",
"recoverable": true
}
]
}The status codes the API uses:
401: the API key is missing or not valid.402: onconfirm_card_payment, the payment could not be taken.409: onchallenge_callback, no challenge is waiting for a result, or the result was not accepted.422: the request did not pass validation. Onconfirm_card_payment, this includes acard_numberorcard_cvcsent as digits straight to Dohop instead of through PCI Proxy.
Problems that come up while an order is being booked are not returned as failed requests. They are reported in the error of the poll response.