Integrate Recurring Payments Using Cards

Know how to integrate Recurring Payments using Card as a payment method.


In India, recurring payments were restrictive in the past because of the RBI's requirement for a two-step verification process where the customer required to enter a One-Time Password (OTP), received via email or SMS, to complete the payment. In recent times, due to the relaxation of this requirement, you can define the interval in which you can charge customers automatically.

Important Notice:

RBI issued

on recurring card payments applicable from 31 March 2021. Know how these changes can affect your integration and how Razorpay is solving this.

Tokenisation for Card based Recurring Payments

To process recurring mandates, customer card details must be secured/tokenised in accordance with Applicable Laws. Razorpay Checkout explicitly collects customer consent for tokenising the card to process e-mandate/recurring transactions.

Tokenisation for card based Recurring Payments on Checkout

The Recurring Payment integration involves the following steps:

Mandate registration is a process of creating a payment checkout form for customers to make Authorization Transaction and register their Card mandate. A token will be generated once a customer makes this transaction.

Using this authorization transaction, we can authenticate the customer's Card mandate and ensure that we can charge them recurring payments. The authorization transaction can be created using the following methods:

Following is the authorisation transaction flow for Razorpay Standard Checkout method.

Authorisation transaction flow for Razorpay Standard Checkout

To create checkout form for customers to complete authorisation transaction using the Razorpay Standard Checkout method:

Watch Out!

The authorization transaction using standard checkout can be created only using Razorpay APIs.


  1. This returns a customer_id.

  2. This returns an order_id. The order must be created for:

  3. Pass the customer_id, order_id and a few additional parameters in your checkout to create the authorization payment. The customer completes the authorization payment, which generates a token.

Registration Links are securely generated web addresses that allow your customers to complete the authorization transaction. Registration links can be sent via SMS or email.

Following is the authorisation transaction flow for Razorpay registration link method:

Recurring Payments Using Registration Link

For customers to complete the authorization transaction via a registration link, you should Create a registration link and send it to your customer.

You can create a Registration Link using:

The customer completes the authorisation payment, which generates a token.

No Need to Create a Customer and Order Separately

If you use a registration link to create the authorization transaction, Razorpay automatically creates a customer and the order for you.

A registration link moves through the following states during its life cycle:

Once the customer has made the Authorization Payment, it moves through the following states as per the

:

This is a process of fetching the token that contains the registration details of the customer and checking its status.

A token represents a mandate registration and is generated after the authorisation transaction is successfully captured. A token contains customer's payment details stored by Razorpay and is used to create a recurring payment.

Handy Tips

For simplicity, tokens are considered to be mandates. Hence, the status of the token determines the status of the mandate registration.

You can search for the tokens using the following:

As the authorisation transaction moves through its different states, the token that is generated also undergoes state changes. Following is the life cycle of a token:

Token life cycle

Know more about the turnaround time (TAT) for cards from the

.

This is the process of charging customers the actual subsequent amount using the fetched token and customer details.

Handy Tips

Subsequent payments can be charged without the need of any intervention from the customer. However, subsequent payments need to be created manually by you.

Once a Token goes to the confirmed state, you can start creating recurring payments for the customer as per your business requirements.

You can create subsequent payments using:

To create subsequent payments using the Razorpay Dashboard:


  1. After the authorisation transaction is complete, a token is generated. You can use the search feature on the Razorpay Dashboard to find the required token and check its status.

  2. After you have found the required confirmed token, you can create a subsequent payment by charging the token according to your business needs.

Order is Created Automatically

While creating a subsequent charge using the Razorpay Dashboard, Razorpay automatically creates an order for you when you charge a token. There is no need to create an order separately.

Charge customers using APIs

To create subsequent payments using APIs:


  1. Like any other payment, each subsequent payment is tied to a unique order id. Associating a payment with an order id makes it easier to query Razorpay systems and handle multiple payment attempts and, allows automatic capturing of payments.

  2. Once the order is created, you can create a payment for it.
    After our system validates the payment along with token_id, a razorpay_payment_id is returned. In some cases, the payment entity returned is in the created state and may take 1 working day for confirmation.

Was this page helpful?