Seamless Subscriptions

In this article, you will learn in detail about Seamless Subscriptions.

Seamless subscription allows you to provide your own payment experience to your customers. These seamless APIs allow businesses to have full control of the checkout experience. With this, you can collect all payment details on your webpage and safely send them to Cashfree Payments for processing the payments.

Seamless Subscription Flow

To build a seamless subscription flow for your customers, follow the steps below:

  1. Create Plan - The first step is to create a plan. Plans are a prerequisite to create a subscription. Click here to know more about creating plans using APIs.
  2. Create Seamless Subscription - Once you have created a plan, the next step is to create a subscription. You can charge your customers periodically (periodic) or whenever required (on-demand) for a subscription. Click here to know more about creating subscriptions seamlessly using APIs.
  3. Create Authorisation Request - Now that you have created a subscription, the next step is to create an authorisation request. This authorisation request is for the subscription you created in the previous step. This is applicable only if you have created the subscription using the Create Seamless Subscription API.
  4. Get Authorisation Status - You can check the status of an authorisation request using this API. This is applicable only if you have created the subscription using the Create Seamless Subscription API.

To experience the seamless checkout flow in the test environment, we have provided you with two APIs. Details on how to use them are explained in the sections below:

  • Update Authorisation Status
  • Update Charge Status

📘

The Update Authorisation Status and the Update Charge Status APIs are applicable only in the test environment. Actions that happen in the test environment have no consequences in the production environment.

List of all possible auth statuses are mentioned in the table below:

Auth StatusDescription
INITIALIZEDThis status indicates that the auth is created.
PENDINGThis status indicates that the auth has been attempted by the user, but the response is pending from the bank.
ACTIVEThis status indicates that the auth has been attempted by the user, and we have received a success response from the bank.
FAILEDThis status indicates that the auth has failed due to failed response from the bank.

Update Authorisation Status

The update authorisation status API allows you to update the authorisation status from INITIALIZED state to SUCCESS or FAILED state. To update an authorisation status, there are certain steps you must perform, they are mentioned below:

  1. Create a plan
  2. Create a seamless subscription
  3. Create a authorisation request
  4. Get the authorisation status
  5. Update the authorisation status

Click here to know more about updating the authorisation status via API.

Update Charge Status

The update charge status allows you to update the charge status from PENDING state to SUCCESS or FAILED state. You can update a charge status only if you have created a charge.

There are certain steps you must perform before updating the charge status of a particular subscription. The steps are explained below:

  1. Create a plan
  2. Create a subscription
  3. Create authorisation
  4. Update the authorisation status
  5. Create a charge
  6. Update charge status

Click here to know more about updating a charge status via API.