API ReferenceIntegrationsKnowledge Base

Batch Refunds

The Batch Refunds feature allows you to make refunds in bulk using an XLSX or CSV file. Once you upload a file, it is picked up for processing after 70 minutes. You can cancel a batch upload in the 70 minutes before it is picked up for processing.

Feature Enablement:
This is an on-demand feature and is not available by default. To enable Batch Refunds for your account, raise a request on our Support Portal.

Batch States#

A batch file can assume any of these states:

  • created: This is the initial state of the file when it is uploaded. Once you upload a file, it stays in the created state for 70 minutes. You can cancel the upload during this time.
  • processing: This state indicates that the batch file is being processed by us.
  • processed: This final state of the file. It indicates that all rows in the batch file were been processed, either successfully or unsuccessfully. Download the Batch Refund Report to check the status of each individual refund.
  • cancelled: You can only cancel batch uploads in the created state. You cannot cancel batch uploads in the processing or processed states.

Refund Fees#

Normal Refunds#

Razorpay does not charge any processing fee for normal refunds. However, the transaction fee and GST levied by Razorpay at the time of payment capture will not be reversed to your account.

Instant Refunds#

Razorpay charges a small transaction fee to process instant refunds. Fees will be deducted directly from your account balance and shall be reflected on the Refunds tab in the Dashboard. In cases where instant refund fails and the refund takes 5-7 working days, the levied fee is credited to your balance. The fee break-up is shown in the end-of-the-month invoice generated by Razorpay. Details of fees charged are available in the Instant Refunds Reports downloadable from the Razorpay Dashboard.

For more details about pricing, contact our Support Team.

Create a Batch Refund#

  1. Log into your Dashboard.
  2. Navigate to TransactionsBatch Refunds and click Upload New Batch.
  3. Download the sample file.
  4. Add the required data to the sample file. Refer to the Batch File Fields section for more details.
  5. Upload the file to the Dashboard, check the preview to ensure details are correct and click Submit Batch.

Batch File - Fields#

Download the sample file, add your data to this file and upload it for processing. We support CSV, XLS and XLSX file formats for the batch file. We do not support custom headers.

Shown below is a sample data from a batch file:

The below table lists the various headers in the sample batch file and gives a brief description of each.

Payment Idmandatory
string The unique identifier for the payment that is to be refunded. For example, pay_F1JdjAyjRexm9T.
amountmandatory
integer The amount, in currency sub-units, to be refunded. For example, pass 1000 to process a refund of ₹10.
speed optional
boolean The speed at which the refund should be processed. Possible values:
  • optimum - We will try to process the refund instantly. If it is not possible to process the refund instantly, we will process the refund in 5-7 working days. Learn more about instant refunds.
  • normal - The refund is processed in 5-7 working days.

    If no value is passed, the refund is processed using the default speed set on the Dashboard.

Cancel a Batch Upload#

You can cancel a batch upload from the Dashboard.

Note:
You can only cancel batch uploads in the created states. Batch uploads in the processing and processed states cannot be cancelled.

To cancel a batch upload:

  1. Log into your Dashboard.
  2. Navigate to TransactionsBatch Refunds.
  3. Click Cancel against the required Batch Id to cancel the batch upload.

Batch Refund Report#

When a batch file reaches the processed state, it does not necessarily mean that all payments were successfully refunded. There is a chance that a few payments were not refunded because of some error. For example, because the payment ID entered was wrong.

Download the Batch Refund Report to check the status of each individual data row.

  1. Log into your Dashboard.
  2. Navigate to TransactionsBatch Refunds.
  3. Click Download against the required Batch Id to download the Batch Refund Report.
    • If a payment was successfully refunded, the corresponding data row is populated with a Refund Id.
    • If a payment was not successfully refunded, the corresponding data row is populated with an Error Code and Error Description.

The below animation shows you how to download the Batch Refund Report.

Batch Report - Fields#

Shown below is a sample data from a processed batch file:

The below table lists the various headers in the processed batch file and gives a brief description of each.

Payment Id
string The unique identifier for the payment that is to be refunded. For example, pay_F1JdjAyjRexm9T.
Amount (In Paise)
integer The amount, in currency sub-units, to be refunded. For example, pass 1000 to process a refund of ₹10.
Refund Id
string The unique identifier of the refund. For example, rfnd_EqWThTE7dd7utf.
Refunded Amount
integer The amount, in currency sub-units, refunded to the customer. For example, 1000 means ₹10 was refunded to the customer.
status
string The status of the refund. Possible values:
  • processed - The refund was successfully processed by us.
  • failure - The refund was not processed. You need to create the refund again.
Speed Requested
string The requested refund speed. Possible values:
  • optimum - We will try to process the refund instantly. If it is not possible to process the refund instantly, we will process the refund in 5-7 working days. Learn more about instant refunds.
  • normal - The refund is processed in 5-7 working days.

    If no value is passed, the refund is processed using the default speed set on the Dashboard.
Error Code
string The error code for the failure. For example, BAD_REQUEST_ERROR.
Error Description
string The reason for the error. For example, The refund amount provided is greater than the unrefunded amount.
×