Batch Upload

While creating Payment Links can be a fairly simple way of collecting payments from your customers, generating them for large volumes of orders can become challenging. Especially for businesses that accepts majority of their payment through Payment Links and have issuing them as a part of their process.

Uploading a single file (often called the batch file) containing the required details for a collection of orders allows us to generate and process the Payment Links in bulk instead of creating individual links.

Batch File Format#

A batch file is a simple .xlsx or .csv file that contains all the necessary details for creating payment links for a list of Receipt Nos. The required fields for creating a batch file are explained in the table below:



Invoice No.

Unique receipt ID associated with the order created at your back end. This field has a limit of 40 characters.

Customer Name

Name of the customer.

Customer Email

Email address of the customer.

Customer Contact

Contact number of the customer.

Amount (in paise)

Order amount. Accepted currency is INR.


Brief description of the order.

Expire by

Time of expiry for the payment links. Supported formats:
DD-MM-YYYY HH:mm:ss (For example, 14-12-2018 18:45:00)

Partial Payment

Indicates whether Partial Payments are enabled for your account. This field can have the following values: Yes/No.

Download a sample batch file.

- A batch file can be up to 1 MB.
- You can add up to 5000 rows in a particular file and the processing of the links will happen in the same sequence as listed in the file.
- Field names/headers in a batch should not be modified in order avoid an upload failure.

Batch Statuses#

Once uploaded, a batch file moves through two states as shown in the table below:




This is the initial state of a batch. This indicates that the uploaded batch is created in Razorpay's database and is ready to be processed. No processing of payment details has been done until this point.


This is the final state of a batch where payment details are processed and the corresponding Payment Links are ready to be issued.

Creating a Batch File#

Follow the steps given below to upload a batch file:

  1. Log in to your Razorpay Dashboard and navigate to Payment Links > Batch Uploads.

  2. Click Start Uploading or Click here to Upload. This will open a popup window where you can either drag-drop the file over the highlighted area or click the Click to Upload option to select your file from your system.
    The file is validated and uploaded to Razorpay's server. Once the file is successfully uploaded, a snippet view of the file will be displayed.
    Learn how to handling upload errors.

    Note: Click Download Sample File to refer a sample batch file.

  3. On a popup window, name the file under the CREATE BATCH FILE NAME field.

  4. Under the SEND PAYMENT LINKS field, select the medium (Send SMS or Send Email) through which you wish to send the Payment Links to your customers, once the batch is created.

  5. Click Create & Send Payment Links.
    This will enable Razorpay to process and issue Payment Links to their respective recipients as per the batch file. The newly created batch file will appear on the batch listing page where you can view the details of the previously created batches.

    Sending Links Manually: If you wish to issue the Payment Links on a later date, you can skip this step and click Create Payment Links. This will enable us to process the links but restricts us from issuing them right after they are created. The file will appear on the batch listing page where a Send all links button under Actions will let you manually issue all the links in the batch.

The details of a batch are described by the following fields:

Batch Fields


Batch ID

Unique identifier of a batch.

Batch Name

Name of the batch file.


The number of processed rows in a batch.


Current state of the batch file.


The available actions you can take on a particular batch file: Download Report File, Send all links.

The details of a particular batch can be viewed by clicking the Batch ID. You can view the Total rows processed, Payment Links Created, Paid and Expired Links. You can also view the Status and Created At information of the batch. The details of individual Payment Links created from the batch are also displayed here.

Handling Errors#

Errors can occur either at the time of upload or after the file reaches the Processed state. A Processed batch file does not necessarily mean that all Payment Links were created successfully. There is a chance that few payment links did not get created because of certain issue in the entered data. For example, duplicate Invoice Number, missing data, and many other.

In case of a validation error such as invalid headers or incorrect file type, you will be notified at the time of file upload. Unprocessed payment links are displayed in the batch detail view. In either of the case, an Error File or Report File is generated which would be a duplicate of the original file with few additional columns that describes or indicates the errored fields as shown in the table below:

In such cases, you can Download Report File which will be the same as the original file except it will have the following additional columns:

Additional Fields





This indicates the processing status of the row. It can either be "success" or "failed".

Payment Link ID


The unique identifier of the Payment Link. This will be null/empty if there are errors during the creation.

Payment Link Short URL


The URL of the Payment Link. This will be null/empty if there are errors during the creation.

Error Code


In case of an error, this column will have a error code.

Error Description


In case of error, this column will have the error message

To fix the errors, you can download the Error File/Report File, make the required changes and re-upload the corrected file in the same manner.