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
|Everything worked as expected, request was processed or check authorization was approved, etc. A response body contains the answer to your request.
|The request was unacceptable, either something required was missing or something sent had the wrong format. A list of errors will be returned.
|The request failed the authentication check (bad credentials or bad token or expired token, etc).
|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.
|The request was authenticated but failed the authorization check (this user is not authorized to perform the requested transaction).
|The requested resource doesn't exist.
|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.
|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.