API ReferenceIntegrationsKnowledge Base

Razorpay Recurring Payments

Feature Request:
This feature is available only on-demand. It is not available by default. Raise a request on our Support Portal to enable this feature.

Razorpay Recurring Payments lets you create recurring payments for your customers at intervals that can be completely controlled and defined by you. Our powerful REST APIs let you quickly set up recurring payments for your customers.

In India, recurring payments were restrictive in the past because of the RBI's requirement for a two-step verification process where the customer entered a One-Time Password (OTP), received via email or SMS, to complete the payment.

Now, due to the relaxation of this requirement, customers can be charged automatically at periodic intervals that can be completely defined by you.

Note:
As per RBI guidelines, recurring payments can be enabled through:

Use Cases#

Use Case 1#

As an online marketing agency, you would offer various plans to your clients to run their advertisement campaigns on different platforms.

For example, a customer might want to run their advertisement campaign on various online platforms for the next three months and will pay you ₹1,000 per 5,000 clicks over the next three months.

In this case, you would want to authorize the selected payment method so you can charge them for every 5,000 clicks.

You can do this by passing one of the following values in the appropriate fields:

  • A minimum of ₹1 for cards and UPI.
  • ₹0 for Emandate and Paper NACH.

Use Case 2#

As an investment management company, you might sell mutual funds to your customers under various schemes.

For example, you might offer your customers a plan where they make an initial investment of ₹500 in a mutual fund and can make investments of any amount going forward as per their choice. You might want to charge the initial investment amount immediately after the selected payment method is authorized.

You can do this by passing the first payment amount in the appropriate field.

Integration Flow#

The integration flow varies depending on how you choose to create the authorization transaction.

Using Razorpay Standard Checkout#

This is possible only via APIs. The integration flow to collect recurring payments using the Razorpay Standard Checkout is:

  1. Create a customer. This returns a customer_id.
  2. Create an order. This returns an order_id. The order amount for:
    • For Emandate is ₹0.
    • Cards is a minimum of ₹1.
    • Paper NACH is ₹0.
    • UPI is ₹1.
  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. This payment can be authorized using one of the following instruments:
    • Emandate.
    • Card.
    • Paper NACH. The following additional steps have to be completed for NACH:
      1. The customer either downloads a pre-filled NACH form or you can send it to the customer.
      2. The customer signs the pre-filled NACH form.
      3. The customer either uploads the signed form or sends it to you to upload for processing.
    • UPI.
  4. Retrieve and check the status of the token. Once the token status changes to confirmed, you can create and charge subsequent payments.
  5. Create and charge subsequent payments. To do this, you have to manually:
    1. Create a new order.
    2. Create a recurring payment.

Using a Registration Link#

You can create registration links either using API or from the Dashboard. The integration flow to collect recurring payments using a registration link is:

  1. Create a registration link and send it to your customer. The customer completes the authorization payment, which generates a token. This payment can be authorized using one of the following instruments:
    • Emandate.
    • Card.
    • Paper NACH. The following additional steps have to be completed for NACH:
      1. The customer either downloads a pre-filled NACH form or you can send it to the customer.
      2. The customer signs the pre-filled NACH form.
      3. The customer either uploads the signed form or sends it to you to upload for processing.
    • UPI 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 on your behalf.
  2. Retrieve and check the token status. Once the token status changes to confirmed, you can create and charge subsequent payments.
  3. Create and charge subsequent payments. To do this, you have to manually:
    1. Create a new order.
    2. Create a recurring payment.

Terminology#

The terminology used throughout this document helps understand the payment flow and integrate quickly.

Term

Definition

Customer

The person for whom you are creating the recurring payment or authorization transaction.

Order

Every payment should have an order associated with it. You must create a separate order for the authorization transaction and every subsequent charge.

Authorization Transaction

The payment made by the customer to authorize the selected payment method.

Authorization Payment

One of the ways of collecting an authorization transaction using the Razorpay Standard Checkout.

Registration Link

One of the ways of collecting an authorization transaction via a link sent to the customer.

Token

When a customer's selected payment method is authorized, a token is generated. A token represents mandate registration.