POST
/
api
/
v2
/
subscriptions
/
nonSeamless
/
subscription
curl --request POST \
  --url https://sandbox.cashfree.com/pg/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"
  ]
}'

Headers

X-Client-Id
string
required

Client ID provided by Cashfree.

X-Client-Secret
string
required

Client Secret provided by Cashfree.

Body

application/json
authAmount
number

Authorization amount for subscription.

customerEmail
string

Customer's email address.

customerName
string

Customer's name for the subscription.

customerPhone
string

Customer's phone number.

expiresOn
string

Expiry date of the subscription.

notificationChannels
string[]

Notification channels for updates.

payerAccountDetails
object

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

planInfo
object

Information regarding the plan.

returnUrl
string

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

splitDetails
object

Details regarding payment split between different vendors.

subscriptionId
string

Unique ID for the subscription.

tpvEnabled
boolean

Flag to enable TPV (Third Party Verification).

Response

200 - application/json
data
object
message
string

Message indicating the status of the subscription creation.

status
integer

HTTP response status.