Skip to main content
This integration allows you to integrate with a Cashfree hosted payment page. Below is a step-by-step guide for each part of the integration process.

Requirements

  1. Create a Cashfree Merchant Account.
  2. Log in to the Merchant Dashboard and go to Payment Gateway > Developers > API Keys to generate test keys.
  3. Generate API Keys - Client ID & Secret Key.

Step 1: Create a plan

API Documentation: Create Plan

Response

Once the request is successful, you will receive a response as shown below:

Step 2: Create subscription

API Documentation: Create Subscription

Response

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 :-
Try out here: codepen
  1. Take the subscription_session_id and paste it in the codepen link and click on Submit.
  1. You will be redirected to the subscription checkout page.
  1. Choose the payment mode you want to setup the subscription and submit. In case of sandbox you will be asked to simulate the payment.
  1. 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 Subscription

Response

Once the request is successful, you will receive a response as shown below:

Step 5: Raise a charge on subscription

API Documentation: Raise a charge

Response

Once the request is successful, you will receive a response as shown below: