Skip to main content
Available in🇮🇳 India
You can create an authorisation transaction using the Razorpay APIs or Registration Link.

1.1. Using Razorpay APIs

To create an authorisation transaction using the Razorpay APIs, you need to:
  1. Fetch Payment Methods.
  2. Create a Customer.
  3. Create an Order.
  4. Create Authorisation Payment using Razorpay APIs.

1.1.1. Fetch Payment Methods

Use the below endpoint to fetch a list of banks Razorpay supports for different payment methods. GET /methods
Watch Out!To fire this API, provide your [KEY_ID] for authorization. Your [KEY_SECRET] is NOT required and should NOT be passed.

1.1.2. Create a Customer

Razorpay links recurring tokens to customers using a unique identifier generated through the Customer API. You can create customers with basic information such as email and contact and use them for various Razorpay offerings. The following endpoint creates a customer.
Handy TipsCreate one customer ID per customer, using a unique email or phone number. Reusing or duplicating customers breaks data analysis and stops the Fetch Tokens by Customer ID API from returning the expected tokens.
POST /customers

Request Parameters

string
The name of the customer. For example, Gaurav Kumar.
string
The email address of the customer. For example, gaurav.kumar@example.com.
string
The phone number of the customer. For example, 9876543210.
string
The request throws an exception by default if a customer with the exact details already exists. You can pass an additional parameter fail_existing to get the existing customer’s details in the response. Possible values:
  • 1 (default): If a customer with the same details already exists, throws an error.
  • 0: If a customer with the same details already exists, fetches details of the existing customer.
object
Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

1.1.3. Create an Order

Use the Orders API to create a unique Razorpay order_id that is associated with the authorisation transaction. The following endpoint creates an order. POST /orders
Given below is the sample code to authenticate emandate with Aadhaar. Aadhaar authentication type is enabled by default for your Razorpay account.
Authorisation transaction + auto-charge first paymentYou can register a customer’s mandate and charge them the first recurring payment as part of the same transaction. Know more about charge first payment automatically after Emandate registration.

Request Parameters

integer
required
Amount in currency subunits. For emandate, the amount should be 0.
string
required
The 3-letter ISO currency code for the payment. Currently, we only support INR.
boolean
required
Determines whether the payment status should be changed to captured automatically or not. Possible values:
  • true: Payments are captured automatically.
  • false: Payments are not captured automatically. You can manually capture payments using the Manually Capture Payments API.
string
required
The authorisation method. Here, it is emandate.
string
required
The unique identifier of the customer to be charged. For example, cust_D0cs04OIpPPU1F.
string
A user-entered unique identifier of the order. For example, rcptid #1. You should map this parameter to the order_id sent by Razorpay.
object
Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
object
Details related to the authorisation such as max amount and bank account information.
string
Emandate type used to make the authorisation payment. Possible values:
  • netbanking
  • debitcard
  • aadhaar
integer
The maximum amount in paise a customer can be charged in a transaction. Know about the maximum and default values.
integer
The Unix timestamp to indicate till when you can use the token (authorisation on the payment method) to charge the customer subsequent payments. Defaults to 40 years. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error.
object
Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
object
Customer’s bank account details that should be pre-filled on the checkout.
string
Mandatory if the bank_account object is sent. Customer’s bank account number.
string
Customer’s bank account type. Possible values:
  • savings (default)
  • current
string
Mandatory if the bank_account object is sent. Customer’s bank IFSC. For example UTIB0000001.
string
Mandatory if the bank_account object is sent. Name of the beneficiary. For example, Gaurav Kumar. Must be 4 to 120 characters.

1.1.4. Create an Authorisation Payment

Once an order is created, your next step is to create a payment. Use the below endpoint to create a payment with payment method emandate. POST /payments/create/json

Request Parameters

integer
required
Amount in currency subunits. For emandate, the amount has to be 0 (₹0).
string
required
The 3-letter ISO currency code for the payment. Currently, we only support INR.
string
required
The unique identifier of the order created in Step 1.1.3.
string
required
The unique identifier of the customer to be charged. For example, cust_K39wXdBlhqNk0B.
boolean
required
For emandate, this must be true.
string
Mandatory if not sent in Create an Order (step 1.1.3). Emandate type used to make the authorisation payment. Possible values:
  • netbanking
  • debitcard
  • aadhaar
string
required
The customer’s email address. For example, gaurav.kumar@example.com.
string
required
The customer’s contact number. For example, 8888888888.
string
required
The payment method selected by the customer. Here, the value must be emandate.
string
required
The customer’s bank name. The bank code used here should match the bank details used in Step 1.1.3. Use the Method API to check the bank code.
object
Customer’s bank account details. Optional if they were sent in Create an Order; otherwise mandatory.
string
Mandatory if the bank_account object is sent. Customer’s bank account number.
string
Customer’s bank account type. Possible values:
  • savings (default)
  • current
string
Mandatory if the bank_account object is sent. Customer’s bank IFSC. For example HDFC0000001.
string
Mandatory if the bank_account object is sent. Name of the account holder. For example, Gaurav Kumar.

Response Parameters

If the payment request is valid, the response contains the following fields. Refer to the S2S Json V2 integration document for more details.
string
Unique identifier of the payment. Present for all responses.
array
A list of action objects available to you to continue the payment process. Present when the payment requires further processing.
string
An indication of the next step available to you to continue the payment process. The value here is redirect - Use this URL to redirect customer to the bank page.
string
URL to be used for the action indicated.
Registration Links are an alternate way of creating an authorisation transaction. If you create a registration link, you need not create a customer or an order. When you create a registration link, an invoice is automatically issued to the customer. The customer can use the invoice to make the Authorisation Payment. Know how to create Registration Links using the Dashboard.
Handy TipsYou can use webhooks to get notifications about successful payments against a registration link. Know more about Webhooks.
A registration link must always have an amount (in Paise) that the customer will be charged when making the authorisation payment. In the case of emandate, the order amount must be 0. The following endpoint creates a registration link. POST /subscription_registration/auth_links

Request Parameters

object
Details of the customer to whom the registration link is sent.
string
required
Customer’s name.
string
required
Customer’s email address.
string
required
Customer’s contact number.
string
required
In this case, the value is link.
integer
required
The payment amount in the smallest currency sub-unit.
string
required
The 3-letter ISO currency code for the payment.
string
required
A description that appears on the hosted page.
object
Details of the authorisation payment.
string
required
The authorization method. Here, it is emandate.
string
Possible values:
  • netbanking
  • debitcard
  • aadhaar
integer
The maximum amount, in paise, a customer can be charged in a transaction. Know about maximum and default values.
integer
The Unix timestamp indicates till when you can use the token (authorization on the payment method) to charge the customer their subsequent payments. Defaults to 40 years. The maximum value you can set is 40 years from the current date. Any value beyond this will throw an error.
object
The customer’s bank account details.
string
Mandatory if the bank_account object is sent. Name of the beneficiary. For example Gaurav Kumar. Must be 4 to 120 characters.
string
Mandatory if the bank_account object is sent. Customer’s bank account number. For example 11214311215411.
string
Customer’s bank account type. Possible values:
  • savings (default)
  • current
string
Mandatory if the bank_account object is sent. Customer’s bank IFSC. For example HDFC0000001.
boolean
Indicates if SMS notifications are to be sent by Razorpay. Possible values:
  • true (default): Notifications are sent by Razorpay .
  • false: Notifications are not sent by Razorpay.
boolean
Indicates if email notifications are to be sent by Razorpay. Possible values:
  • true (default): Notifications are sent by Razorpay .
  • false: Notifications are not sent by Razorpay.
integer
The Unix timestamp indicates the expiry of the registration link.
string
A unique identifier entered by you for the order. For example, Receipt No. 1. You should map this parameter to the order_id sent by Razorpay.
object
This is a key-value pair that is used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

1.2.2. Send/Resend Notifications

The following endpoint sends/resends notifications with the short URL to the customer: POST /invoices/:id/notify_by/:medium
Response

Path Parameters

string
required
The unique identifier of the invoice linked to the registration link for which you want to send the notification. For example, inv_1Aa00000000001.
string
required
Determines through which medium you want to resend the notification. Possible values:
  • sms
  • email
The following endpoint cancels a registration link. POST /invoices/:id/cancel
Handy TipsYou can only cancel registration link in the issued state.
Response

Path Parameter

string
required
The unique identifier for the invoice linked to the registration link that you want to cancel. For example, inv_1Aa00000000001.

1.3. Error Scenarios

If the authorisation payment fails, the payment carries an error object with code, description, source, step and reason. Use the reason to decide the next action for the customer. For the Emandate error reasons, see Error Codes.
Last modified on November 19, 2026