Skip to main content
POST
/
api
/
v2
/
subscriptions
/
nonSeamless
/
subscription
curl --request POST \
--url https://sandbox.cashfree.com/api/v2/subscriptions/nonSeamless/subscription \
--header 'Content-Type: application/json' \
--header 'X-Client-Id: <x-client-id>' \
--header 'X-Client-Secret: <x-client-secret>' \
--data '{
"subscriptionId": "DemoSubscriptionq",
"customerName": "John Doe",
"customerPhone": "9999900000",
"customerEmail": "john@gmail.com",
"returnUrl": "www.google.com",
"authAmount": 10,
"expiresOn": "2024-12-02 09:20:12",
"planInfo": {
"type": "ON_DEMAND",
"planName": "abcede",
"maxAmount": 1000,
"maxCycles": 10,
"linkExpiry": 5
},
"notificationChannels": [
"EMAIL",
"SMS"
]
}'
{
  "status": 200,
  "message": "Subscription Created",
  "data": {
    "subReferenceId": 1234,
    "authLink": "https://cfre.in/wjnwdj3"
  }
}

Headers

X-Client-Id
string
required

Client ID provided by Cashfree.

Example:

"14443641"

X-Client-Secret
string
required

Client Secret provided by Cashfree.

Example:

"a477ed7e"

Body

application/json
subscriptionId
string

Unique ID for the subscription.

Example:

"DemoSubscriptionq"

customerName
string

Customer's name for the subscription.

Example:

"John Doe"

customerPhone
string

Customer's phone number.

Example:

"9999900000"

customerEmail
string

Customer's email address.

Example:

"john@gmail.com"

returnUrl
string

URL to which the customer is redirected after the subscription process.

Example:

"www.google.com"

authAmount
number

Authorization amount for subscription.

Example:

10

expiresOn
string

Expiry date of the subscription.

Example:

"2024-12-02 09:20:12"

tpvEnabled
boolean

Flag to enable TPV (Third Party Verification).

Example:

true

payerAccountDetails
object

Details of the payer's account if TPV is enabled.

planInfo
object

Information regarding the plan.

notificationChannels
string[]

Notification channels for updates.

Example:
["EMAIL", "SMS"]
splitDetails
object

Details regarding payment split between different vendors.

Response

Subscription created successfully.

status
integer

HTTP response status.

Example:

200

message
string

Message indicating the status of the subscription creation.

Example:

"Subscription Created"

data
object