Skip to main content
POST
/
api
/
v2
/
subscriptions
/
{subReferenceId}
/
charge
Charge Subscription
curl --request POST \
  --url https://sandbox.cashfree.com/api/v2/subscriptions/{subReferenceId}/charge \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Id: <x-client-id>' \
  --header 'X-Client-Secret: <x-client-secret>' \
  --data '
{
  "amount": 1,
  "scheduledOn": "2023-01-20",
  "remarks": "Charge Subscription",
  "merchantTxnId": "test-txn-id-888"
}
'
{
  "status": "ERROR",
  "message": "Server encountered an unexpected condition."
}

Headers

X-Client-Id
string
required

Client ID provided by Cashfree.

Example:

"asdf1234"

X-Client-Secret
string
required

Client Secret provided by Cashfree.

Example:

"qwer9876"

Path Parameters

subReferenceId
integer
required

The reference ID of the subscription to be charged.

Example:

2596620

Body

application/json
amount
number

Amount to be charged.

Example:

1

scheduledOn
string<date>

Date to schedule the charge.

Example:

"2023-01-20"

remarks
string

Remarks for the charge.

Example:

"Charge Subscription"

merchantTxnId
string

Merchant transaction ID for the charge.

Example:

"test-txn-id-888"

Response

Successful charge of the subscription.