Skip to main content
POST

Validation checks

The API runs the following checks, depending on your account type and the fields that you send. For what prefunding and postfunding mean, see Payment Scenarios. The shortfall limit is the maximum amount by which your recharge wallet can go below zero. The last column lists the reason codes that the API returns when a check fails or cannot be completed: If payments has a pg_amount but no pg_reference_id, nothing is verified. The API uses pg_amount only to work out how much of the recharge the wallet has to cover.
A VALID result is advisory. The Recharge Request API checks everything again, so its result can differ if your wallet balance, your shortfall limit, or the payment changes between the two calls.

Reason codes

When the status is INVALID or UNAVAILABLE, the API returns HTTP 200 with a reason_code and a reason_message that explain the result. Do not take payment for an INVALID recharge. For an UNAVAILABLE result, you can still send the recharge request. The following table lists the reason codes the API can return:
Other reason codes can be returned. Handle them by status, and show reason_message where it helps.

Error codes

The following table lists the error codes you may encounter when validating a recharge:

Authorizations

x-client-id
string
header
required

Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.

x-client-secret
string
header
required

Your unique client secret issued by Cashfree. Keep this confidential and never expose it in client-side code. You can find this in your Merchant Dashboard.

Headers

x-api-version
enum<string>
default:2025-01-01

API version to be used. Format is YYYY-MM-DD. The only supported version for this API is 2025-01-01. If not specified, 2025-01-01 is used.

Available options:
2025-01-01

Body

application/json

The recharge to check. These are the fields of the recharge request, without reference_id.

recharge_number
string
required

The mobile number or direct-to-home (DTH) customer ID to recharge. A mobile number must be a valid Indian mobile number.

Maximum string length: 20
Example:

"9876543210"

operator
string
required

The operator code, from the Fetch Operators or Fetch Operator Details API.

Maximum string length: 50
Example:

"JIO"

amount
number
required

The recharge amount in rupees. It must be a whole rupee amount greater than 0.

Example:

299

service_type
enum<string>
required

The type of recharge.

Available options:
MOBILE,
DTH
Example:

"MOBILE"

circle
string

The telecom circle of the number, as returned by the Fetch Operator Details API, for example Delhi. It is optional and is not case-sensitive.

Maximum string length: 50
Example:

"Delhi"

payments
object[]

How the customer paid, or will pay. Send it when the customer pays through Cashfree Payment Gateway, so that the check matches the recharge request. Leave it out when the customer pays another way.

Maximum array length: 1

Response

The check was completed. Read data.status for the result.

status
string

The status of the API call. Returns OK whenever the request is processed, whatever the result.

Example:

"OK"

message
string

A message describing the result.

Example:

"Recharge validation processed"

data
object

The result of the check.