Requirements
- Create a Cashfree Merchant Account.
- Log in to the Merchant Dashboard and go to Payment Gateway > Developers > API Keys to generate test keys.
- Generate API Keys - Client ID & Secret Key.
Step 1: Create a plan
API Documentation: Create PlanResponse
Once the request is successful, you will receive a response as shown below:Step 2: Create subscription
API Documentation: Create SubscriptionResponse
Once the request is successful, you will receive a response as shown below:Step 3: Initiate an auth
Use the subscription_session_id received in the response of create subscription to initiate the subscription auth checkout. Refer to below code module to integrate :-- Take the subscription_session_id and paste it in the codepen link and click on Submit.

- You will be redirected to the subscription checkout page.

- Choose the payment mode you want to setup the subscription and submit. In case of sandbox you will be asked to simulate the payment.

- You will be redirected to the return url post the transaction is completed.
Step 4: Get subscription details
Use this API to check the subscription status and auth details post completion of the payment. API Documentation: Get SubscriptionResponse
Once the request is successful, you will receive a response as shown below:Step 5: Raise a charge on subscription
API Documentation: Raise a chargeUse the simulate payment API to simulate a charge status in the sandbox environment.