How this API works with HTTP Status Codes
CashLine uses conventional HTTP status codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success and approvals. Codes in the 4xx range indicate that the request has failed. Codes in the 5xx range indicate an error with Certegy’s servers (although this should be rare). Some 4xx errors that could be handled programmatically may include an array of errors in the response body that provide more detail.
Here is a summary for each HTTP response code in the API:
HTTP Status Code | Status | Description |
---|---|---|
200 | OK (success) | Everything worked as expected, request was processed or check authorization was approved, etc. A response body contains the answer to your request. |
400 | Bad Request | The request was unacceptable, either something required was missing or something sent had the wrong format. A list of errors will be returned. |
401 | Not Authenticated | The request failed the authentication check (bad credentials or bad token or expired token, etc). |
402 | Request Failed | The parameters were valid but the request failed. This is what you get back for a decline (or not enrolled or not updated or not approved or request failed). A list of errors will be returned. |
403 | Not Authorized | The request was authenticated but failed the authorization check (this user is not authorized to perform the requested transaction). |
404 | Not Found | The requested resource doesn't exist. |
409 | Conflict | The request conflicts with another request (this normally happens on an update when the passed parameters conflict with the resource key used for the update). A list of errors will be returned. |
500 502 503 504 | Server Errors | Something went wrong on Certegy's server. (These errors should be rare.) You usually but not always receive a response body with a list of errors. |