Subscriptions
Cashfree Hosted Checkout
Learn how to integrate Cashfree Hosted subscription checkout
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
- Create a Cashfree Merchant Account.
- Log in to the Merchant Dashboard and generate test keys from Cashfree Dashboard.
- Generate API Keys - Client ID & Secret Key.
Step 1: Create a Plan
API Documentation: Create Plan
Step 2: Create Subscription
API Documentation: Create Subscription
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
- 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 Subscription
Step 5: Raise a charge on subscription
API Documentation: Raise a charge
Was this page helpful?