When integrating with Cashfree, you may have to handle errors while making API requests. Calling the APIs ensures an operation occurs on Cashfree's server. Errors are displayed when the request operation fails.
Every API call returns a status field describing if the call was successfully processed or not. The status field has two values SUCCESS and ERROR. Checking this field after every call can ensure whether the API call was successful or not.
Every failed response form Cashfree's server has an error sub-code and a corresponding error message. The sub-code reflects the nature of the error that occurred. Check the list of sub-codes here.
We strongly recommended to scan error sub-code and not error messages.
In case you are using Cashfree libraries, error responses result in an exception which you need to catch and handle in your integration.
All sub-codes are standard HTTP status codes-the below ones used in this API.
4XX - Error occurred in the client’s part 5XX - Error occurred in the server’s part
Entity does not exist
Method does not exist
Resource conflict. Resource might already exist
Request Entity too large to be processed
Input not in an expected format
Too many error requests
Internal Server Error