API ReferenceIntegrationsKnowledge Base

Batch Operations

You can create registration links in bulk using the Batch Upload feature. To create registration links in bulk, you need to:

  1. Download the CSV sample batch file from the Dashboard.
  2. Add the required information to the file.
  3. Upload the file on the Dashboard.

Things to remember:
A few things to keep in mind when using the batch upload feature:

  • You can upload batch files in either in the .xlsx or the .csv format.
  • The upload can have a maximum size of 1 MB and 10,000 rows.
  • The links are processed in the same sequence as listed in the file.
  • Do not modify the column headers. Modifying the column headers will cause the upload to fail.

Batch Statuses🔗

Status

Description

Created

This is the initial state of a batch. This indicates that the uploaded batch is created in Razorpay's database and is being processed.

Partially Processed

This means the batch file is being processed.

Processed

This is the final state of a batch and indicates that the batch file was processed. This does not mean all rows were processed successfully. Individually data rows could be processed successfully or with errors. You can check these details via the Batch Report.

Create Registration Links🔗

To create registration links using the batch upload feature:

  1. Log into the Dashboard.
  2. Navigate to SubscriptionsBatch UploadUpload New BatchBatch Registration Links.
  3. Download the sample file.
  4. Add the required data. Refer to the below table for more information.
  5. Upload the file to the Dashboard.
  6. Select the relevant notification options, SMS and/or Email.
  7. Click Create.

Watch the below animation for more information.

Batch Fields🔗

The table below lists the fields required to create a registration link and gives a brief description of each field.

name optional
The customer's name. For example, Gaurav Kumar.
email mandatory
The customer's email address. For example, gaurav.kumar@example.com.
phone mandatory
The customer's contact number. For example, 9876543210.
amount mandatory if method = card/upi
The registration amount you want to charge the customer in paise.
  • For Card, the minimum value is 100 (that is ₹1).
  • For Emandate and NACH, the authorization value is 0.
    Auto-charge first payment:
    You can choose to auto-charge the customer an initial payment immediately after authorization by entering any value greater than 0. For example, if you enter 100000, the customer is auto-charged ₹1,000 as soon as the token is confirmed.
  • For UPI, the minimum value is 100 (that is ₹1).
currency mandatory if amount is provided
The 3-letter ISO currency code for the payment. Currently, only INR is allowed.
method mandatory
The payment method to be authorized. This can be:
  • emandate
  • card
  • nach
  • upi
token_expiry_by optional
The date and time of expiry for a mandate.
Minimum value is 1 day. Defaults to 10 years for Emandate, Paper NACH and UPI.
Maximum value is 31/12/2099.
Supported formats:
  • DD/MM/YYYY HH:mm:ss (For example, 31/12/2019 00:59:59)
  • DD/MM/YYYY HH:mm
  • DD/MM/YYYY
token_max_amount optional
Emandate, NACH and UPI only. Maximum amount for the token (in paise).
  • For emandate:
    • Default value is is 9999900 (₹99,999).
    • Minimum value is 500 (₹5).
    • Maximum value is is 9999900 (₹99,999).
  • For Paper NACH:
    • Default value is 10000000 (₹1 lac).
    • Minimum value is 500 (₹5).
    • Maximum value is 1000000000 (₹1 cr).
  • For UPI:
    • Default value is 200000 (₹2,000).
    • Minimum value is 100 (₹1).
    • Maximum value is 200000 (₹2,000).
auth_type mandatory if mehtod =nach
Emandate and NACH only. The payment authorization type. Possible values:
  • netbanking or debitcard for emandate. Leave this blank if you want to allow the customer to select their preferred option when making the payment.
  • physical for NACH.
bank mandatory if method = nach
Emandate and NACH only. Bank code to preselect a bank. For example, HDFC.
You can fetch bank codes by firing the following API as a GET request:
https://<YOUR_KEY_ID>@api.razorpay.com/v1/methods.
account_holder_name mandatory if method = nach
Emandate and NACH only. Name of the account holder. For example, Gaurav Kumar.
ifsc mandatory if method = nach
Emandate and NACH only. The bank's IFSC. For example, HDFC0001234.
account_number mandatory if method = nach
Emandate and NACH only. Customer's bank account number. For example, 11214311215411.
account_type mandatory if method = nach
Emandate and NACH only. Bank account type. Possible values:
  • savings
  • current
receipt optional
A user-entered unique identifier for the order. For example, Receipt No. 1. This parameter should be mapped to the order_id sent by Razorpay.
description mandatory
A user-entered description for the registration link. For example, 12 p.m. Meals.
link_expiry_by optional
Date and time of expiry for the registration link. Supported format DD/MM/YYYY. For example, 17/12/2020.
notes[custom 1] optional
Key-value pair that can be used to store additional information about the entity. You can add up to 5 custom notes in the following format:
  • notes[portfolio id]
  • notes[transaction id]

Bank Details
For Emandate, you either provide all required bank details or leave all the fields blank. That is, you either provide values for all the following fields or leave all of them blank. The bank detail fields are:

  • bank
  • account_holder_name
  • ifsc
  • account_number
  • account_type

Providing values for some fields, while leaving others blank will lead to failure.

Processed Batch Fields🔗

Once a batch file is processed, you can download the processed file from the Dashboard. Click the batch_id to view details of how many rows were uploaded, how many rows were processed successfully and how many rows failed.

Click Download Report to download the processed file. This file has the following additional fields that give you information about the authorization link or the reason for failure.

Status
The status of the authorization link. Possible values:
  • success
  • failed
authorization_link_id
The unique identifier for the authorization link. For example, inv_E7vb0PqKa4VpBc.
authorization_link
The short URL for the authorization link. For example, https://rzp.io/i/Abcd5.
link_status
The status of the authorization link. For example, issued.
created_at
Timestamp, in Unix format, when the authorization link was created. For example, 1580134092.
Error Code
The error code for the failure. For example, BAD_REQUEST_ERROR.
Error Description
The reason for the error. For example:
  • Bank code provided is invalid.
  • expire_by should be at least 15 minutes after current time
  • The ifsc code field is required.

Create Recurring Payments🔗

To charge tokens using the batch upload feature, you will first need the list of Tokens for which recurring payments are to be created.

Once you have the list of tokens you can either:

Charge Tokens Immediately🔗

To charge tokens immediately using the bulk upload feature:

  1. Log into the Dashboard.
  2. Navigate to SubscriptionsBatch UploadUpload New BatchBatch Recurring Payments.
  3. Download the sample file.
  4. Add the required data. Refer to the below table for more information.
  5. Upload the file to the Dashboard.
  6. Select Process Now.
  7. Click Create.

The below animation shows you how to charge tokens immediately using the bulk upload feature.

Schedule a Charge on Tokens🔗

You can schedule to charge tokens in bulk.

  1. Log into the Dashboard.
  2. Navigate to SubscriptionsBatch UploadUpload New BatchBatch Recurring Payments.
  3. Download the sample file.
  4. Add the required data. Refer to the below table for more information.
  5. Upload the file to the Dashboard.
  6. Select Schedule for Later and select the date and time you want to charge the tokens. The schedule time should be at least 1 hour from the current time.
  7. Click Create.

The below animation shows you how to schedule a charge on tokens using the bulk upload feature.

Batch Fields🔗

The table below lists the fields required to charge a token and gives a brief description of each field.

token mandatory
The unique identifier for the token. For example, token_1Aa00000000001.
customer_id mandatory
The unique identifier of the customer. For example, cust_1Aa00000000001.
amount mandatory
The amount, in paise, you want to charge the customer. For example, enter 69999 for ₹699.99.
currency mandatory
The 3-letter ISO currency code for the payment. Currently, only INR is allowed.
receiptoptional
A user-entered unique identifier for the order. For example, Receipt No. 1. This parameter should be mapped to the order_id sent by Razorpay.
description optional
A user-entered description for the payment. For example, 12 p.m. Meals.
notes[custom 1] optional
Key-value pair that can be used to store additional information about the entity. You can add up to 5 custom notes in the following format:
  • notes[portfolio id]
  • notes[transaction id]

Processed Batch Fields🔗

Once a batch file is processed, you can download the processed file from the Dashboard. Click the batch_id to view details of how many rows were uploaded, how many rows were processed successfully and how many rows failed.

Click Download Report to download the processed file. This file has the following additional fields that give you information about the authorization link or the reason for failure.

order_id
The unique identifier linked to the order for the payment. For example, order_E16Yt72tHs34li.
payment_id
The unique identifier for the payment. For example, pay_E16YtBnEk38fAm.
Error Code
The error code for the failure. For example, BAD_REQUEST_ERROR.
Error Description
The reason for the error. For example, Payment amount exceeds the maximum amount allowed.
×