Errors

Clearent uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error resulted from the provided information (a required parameter is missing or a charge failed), codes in 5xx range indicate an error with Clearent’s servers.

NOTE: Not all errors map cleaning onto HTTP response codes.  When a request is valid but does not complete successfully (card declined) we return a 402.

Attributes:

code – HTTP response code.

status – status of the request. When an error occurs, the status will be “fail”.

exchange-id – a request identifier that you can send to Clearent for a more specific error response and to guide in troubleshooting.

payload – contains more information about the error. The error-message, result-code and time-stamp fields are located within the payload element.

error-message – enumeration of what went wrong.

result-code – number that corresponds to a specific error. Can be used in error mapping.