POST
/
api
/
v2
/
subscriptions
/
{subReferenceId}
/
charge
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": "OK",
"message": "Subscription charge initialized",
"payment": {
"paymentId": 122129,
"cfOrderId": 112234,
"referenceId": null,
"subReferenceId": 110386,
"currency": "INR",
"amount": 1,
"cycle": 1,
"status": "INITIALIZED",
"addedOn": "2023-01-19 16:49:49",
"retryAttempts": 0,
"remarks": "",
"failureReason": "",
"scheduledOn": "2023-01-20",
"initiatedOn": "2023-01-19",
"merchantTxnId": "test-txn-id-888"
}
}

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

Response

200
application/json

Successful charge of the subscription.

The response is of type any.