> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-60c89f9a-mintlify-audit-missing-sections-1778528421.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Recurring Payments Using Cards

> 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.

### 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.

Recurring Payment integration involves the following steps:

<Steps>
  <Step title="Step 1">
    [Register Card Mandate Registration](#1-register-card-mandate)
  </Step>

  <Step title="Step 2">
    [Fetch Card Mandate Registration Details](#2-fetch-card-mandate-registration-details)
  </Step>

  <Step title="Step 3">
    [Charge Customers](#3-charge-customers)
  </Step>
</Steps>

## 1. Register Card Mandate

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

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

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

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

<Warning>
  **Watch Out!**

  The authorisation transaction using Standard Checkout can be created only using Razorpay APIs.

  1. [**Create a customer**](/api/payments/recurring-payments/cards/create-authorization-transaction#111-create-a-customer)
     This returns a `customer_id`.
  2. [**Create an order**](/api/payments/recurring-payments/cards/create-authorization-transaction#112-create-an-order)
     This returns an `order_id`. The order must be created for:
  3. [**Create authorisation transaction**](/api/payments/recurring-payments/cards/create-authorization-transaction#113-create-an-authorization-payment)
     Pass the `customer_id`, `order_id` and a few additional parameters in your checkout to create the authorisation payment. The customer completes the authorisation payment, which generates a `token`.

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

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

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

  You can create a Registration Link using:

  * [APIs](/api/payments/recurring-payments/cards/create-authorization-transaction#121-create-a-registration-link)
  * [Dashboard](/payments/recurring-payments/create#1-create-a-registration-link)

  The customer completes the authorisation payment, which generates a `token`.
</Warning>

<Info>
  **No Need to Create a Customer and Order Separately**

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

  #### Registration Link Statuses

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

  ## Status | Description | Webhook

  ## Issued | A registration Link is created and sent to the customer. | NA

  Paid | Payment is made for the issued registration Link.
  Once the registration Link is paid, search for Token corresponding to the payment. | [invoice.paid](/api/payments/recurring-payments/webhooks#invoice-paid)
  -----------------------------------------------------------------------------------------------------------------------------------------------------------

  ## Cancelled | The registration link has been canceled. In such cases, you need to create a registration link again.| NA

  Expired | The registration link has expired. You can set an expiry timestamp at the time of creation. | [invoice.expired](/api/payments/recurring-payments/webhooks#invoice-expired)
</Info>

### Authorisation Payment Statuses

Once the customer has made the Authorisation Payment, it moves through the following states as per the [payment flow](/payments/payment-gateway/how-it-works):

## Status | Description | Webhook

## Created | Payment is created when a customer enters and submits the payment information. | NA

## Authorized | Payment is authorized when the customer’s payment details are successfully authenticated by the bank. | [payment.authorized](/api/payments/recurring-payments/webhooks#payment-authorized)

Captured | Indicates that the payment is verified by you.
Once a payment is captured you can [retrieve the token](/payments/recurring-payments/create#3-search-for-the-token). | [payment.captured](/api/payments/recurring-payments/webhooks#payment-captured) or [order.paid](/api/payments/recurring-payments/webhooks#order-paid)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Failed | Indicates that the payment has failed.
If the payment has failed, you need to [create an authorisation transaction](/api/payments/recurring-payments/cards/create-authorization-transaction) again. | [payment.failed](/api/payments/recurring-payments/webhooks#payment-failed)

## 2. Fetch Card Mandate Registration Details

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.

<Info>
  **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:

  * [APIs](/api/payments/recurring-payments/cards/tokens)
  * [Dashboard](/payments/recurring-payments/create#3-search-for-the-token)
  * [Webhooks](/payments/recurring-payments/subscribe-to-webhooks#token-states)
</Info>

### Token Statuses

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_status` | Description | Next Step

## `initiated` | Indicates that the bank is processing the mandate registration. | Wait for the [token.confirmed](/api/payments/recurring-payments/webhooks#token-confirmed) webhook.

## `confirmed` | Indicates that the bank has completed the mandate registration. | [Create recurring payment](/payments/recurring-payments/create)

## `rejected` | Indicates that the mandate registration has failed. | Create the authorisation transaction again.

## `cancelled` | Indicates that the token has been cancelled. | Create the authorisation transaction again if you want to charge the customer.

`paused` | Indicates that the token has been paused by your customer. | The token is inactive. Your customer has paused the token. Ask them to resume the token to charge them.

Know more about the turnaround time (TAT) for cards from the [FAQs](/payments/recurring-payments/cards/faqs).

## 3. Charge Customers

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

<Info>
  **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 Dashboard or APIs.

  To create subsequent payments using the Dashboard:

  1. [**Search for the token and check its status**](/payments/recurring-payments/create#3-search-for-the-token)
     After the authorisation transaction is complete, a token is generated. You can use the search feature on the Dashboard to find the required token and check its status.
  2. [**Charge the token**](/payments/recurring-payments/create#4-charge-the-token)
     After you have found the required confirmed token, you can create a subsequent payment by charging the token according to your business needs.
</Info>

<Info>
  **Order is Created Automatically**

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

  To create subsequent payments using APIs:

  1. [**Create a new Order**](/api/payments/recurring-payments/cards/create-subsequent-payments#31-create-an-order-to-charge-the-customer)
     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. [**Create a Payment**](/api/payments/recurring-payments/cards/create-subsequent-payments#32-create-a-recurring-payment)
     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.
</Info>

### Related Information

* [Supported Banks and Apps](/payments/recurring-payments/cards/supported-banks)
* [APIs](/payments/recurring-payments/cards/apis)
