Skip to main content
POST

Error codes

The following table lists the error codes you may encounter when requesting 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 send.

reference_id
string
required

Your unique ID for this recharge. Use a new value for every new recharge.

Maximum string length: 50
Example:

"recharge_ref_001"

recharge_number
string
required

The mobile number or 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. Send it when the customer paid through Cashfree Payment Gateway. Leave it out when the customer paid another way.

Maximum array length: 1

Response

The recharge was accepted. Read data.status for its state.

status
string

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

Example:

"OK"

message
string

A message describing the result.

Example:

"Recharge request processed"

data
object

The recharge and its current state.