API ReferenceIntegrationsKnowledge Base

Route

Razorpay Route enables you to split payments received using the Razorpay Payment Gateway or other products (such as Payment Links, Payment Pages, Invoices, Subscriptions and Smart Collect) and transfer the funds to your vendors.

You can onboard a vendor and manage their linked account on your Razorpay Dashboard.

The following details are required to create a linked account:

Primary Details

Bank Details


- Linked Account Name
- Type
- Contact Number


- Account Number
- Account Type
- IFSC
- Beneficiary Name

Once a linked account is created, it will be assigned an account_id which can be used in the following APIs.

Postman Collection#

We have a Postman collection to make the integration quicker and easier. Click the Download Postman Collection button below to get started.

Instructions for using the Postman Collection#

  • All Razorpay APIs are authorized using Basic Authorization.
    • Generate API Keys from the Dashboard .
    • Add your API Keys in Postman. Selected the required API → Auth → Type = Basic Auth → Username = <Your_Key_ID>; Password = <Your_Key_secret>
  • Some APIs in the collection require data specific to your account either in the request body or as path or query parameters.
    • For example, the create Transfers via Payments API requires you to add the pay_id as a path parameter in the endpoint.
    • These parameters are enclosed in {} in the collection. For example, {pay_id}.
    • The API throws an error if these are incorrect or do not exist in your system.

Transfers#

You can transfer funds to your linked accounts using the Razorpay Route Transfer APIs. Look up examples of transfers and related fees.

Types of Transfers#

You can transfer funds to linked accounts using one of the following methods.

Transfer Entity#

Route transfers can be performed only on captured payments. You can capture payments from the Razorpay Dashboard or using the Payment Capture API.

The attributes of the transfer entity are listed below:

id
string Unique identifier of the transfer.
entity
string The name of the entity. Here, it is transfer.
source
string Unique identifier of the transfer source. The source can be a payment or an order.
recipient
string Unique identifier of the transfer destination, that is, the linked account.
amount
integer The amount to be transferred to the linked account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035.
currency
string ISO currency code. We support route transfers only in INR.
amount_reversed
integer Amount reversed from this transfer for refunds.
notes
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
linked_account_notes
array List of keys from the notes object which needs to be shown to linked accounts on their Dashboard.
on_hold
boolean Indicates whether the account settlement for transfer is on hold. Possible values:
  • 1 - Puts the settlement on hold.
  • 0 - Releases the settlement.
on_hold_until
integer Timestamp, in Unix format, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely.
recipient_settlement_id
string Unique identifier of the settlement.
created_at
integer Timestamp, in Unix, at which the record was created.

Create Transfers from Orders#

You can set up transfer of funds right at the time of order creation using the Orders API. This can be done by passing the transfers parameters as part of the Order API request body.

/orders

Request Parameters#

amount mandatory

integer The transaction amount, in paise. For example, for an amount of ₹299.35, the value of this field should be 29935.

currency mandatory

string The currency in which the transaction should be made. We support only INR for Route transactions.

receipt optional

string Unique identifier that you can use for internal reference.

transfers

Details regarding the transfer.

account mandatory
string Unique identifier of the linked account to which the transfer is to be made.
amount mandatory
integer The amount to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035. This amount cannot exceed the order amount.
currency mandatory
string The currency in which the transfer should be made. We support only INR for Route transactions.
notes optional
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
linked_account_notes optional
array List of the keys from the notes object which needs to be shown to linked accounts on their dashboard.
on_hold optional
boolean Indicates whether the account settlement for transfer is on hold. Possible values:
  • 1 - Puts the settlement on hold.
  • 0 - Releases the settlement.
on_hold_until optional
integer Timestamp, in Unix format, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely.

Response Parameters#

id

string Unique identifier of the Order created.

entity

string The name of the entity. Here, it is order.

amount

integer The Order amount, in paise. For example, for an amount of ₹299.35, the value of this field should be 29935.

amount_paid

integer The amount paid against the Order.

amount_due

integer The amount pending against the Order.

currency

string The currency in which the order should be created. We support only INR for Route transactions.

receipt

string Unique identifier that you can use for internal reference.

status

string The status of the Order. Possible values:

  • created
  • attempted
  • paid
notes

json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.

created_at

integer Timestamp, in Unix, that indicates when this Order was created.

transfers

Details regarding the transfer.

recipient
string Unique identifier of the linked account to which the transfer is to be made.
amount
integer The amount to be transferred to the linked account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035.This amount cannot exceed the order amount.
currency
string The currency in which the transfer should be made. We support only INR for Route transactions.
notes
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
linked_account_notes
array List of the keys from the notes object which needs to be shown to linked accounts on their dashboard.
on_hold
boolean Indicates whether the account settlement for transfer is on hold. Possible values:
  • 1 - Puts the settlement on hold.
  • 0 - Releases the settlement.
on_hold_until
integer Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely.

Notes:

  • You cannot create transfers on an order which has partial_payment parameter enabled. Ensure that this parameter is set to 0.
  • You cannot create transfers on an order for international currencies. Currently, this feature only supports orders created using INR.

Create Transfers from Payments#

You can create and capture payments in the regular payments flow, using Razorpay Checkout and Payment APIs.

To disburse payments using Razorpay Route, there is an additional step in the payment flow called transfers which is described below:

  1. Customer pays the amount via normal payment flow.
  2. Once the payment is captured, you can initiate a transfer to linked accounts with a transfer API call. You have to specify the details of the account_id and amount.

The following endpoint transfers a captured payment to one or more linked accounts using account_id. On a successful transfer, a response will be generated with a collection of transfer entities created for the payment.

/payments/:id/transfers

Transfer Requirements:

  • Your account must have sufficient funds to process the transfer to the linked account. The transfer will fail in case of insufficient funds.
  • Only captured payments can be transferred.
  • You can create more than one transfer on a payment_id. This holds good as long as the total transfer amount does not exceed the captured payment amount.
  • A transfer cannot be requested on a payment once a refund has been initiated.

In the sample request given, transfers to multiple linked accounts are specified. The payments transferred to the linked accounts will be settled to their respective bank accounts as per the pre-defined settlement_period.

Path Parameter#

id mandatory
string Unique identifier of the payment on which the transfer must be created.

Request Parameters#

transfers

Details regarding the transfer.

account mandatory
string Unique identifier of the linked account to which the transfer is to be made.
amount mandatory
integer The amount to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035.
currency mandatory
string The currency in which the transfer should be made. We support only INR for Route transactions.
notes optional
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
linked_account_notes optional
array List of the keys from the notes object which needs to be shown to linked accounts on their dashboard.
on_hold
boolean Indicates whether the account settlement for transfer is on hold. Possible values:
  • 1 - Puts the settlement on hold.
  • 0 - Releases the settlement.
on_hold_until
integer Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely.

The response parameters are same as the transfer entity parameters.

Direct Transfers#

Apart from transferring payments received from customers, you can also transfer funds to your linked accounts directly from your account balance using the Direct Transfers API.

/transfers

This API creates a direct transfer of funds from your account to linked account. On successful creation, the API responds with the created transfer entity.

Request Parameters#

account mandatory
string Unique identifier of the linked account to which the transfer must be made.
amount mandatory
integer The amount (in paise) to be transferred to the linked account. For example, for an amount of ₹200.35, the value of this field should be 20035.
currency mandatory
string The currency used in the transaction. We support only INR for Route transactions.
notes optional
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.

Fetch Transfers for a Payment#

Use this endpoint to fetch the collection of all transfers created on a specific Payment ID.

/payments/:id/transfers

Path Parameter#

id mandatory
string Unique identifier of the Order for which transfers must be retrieved.

Response Parameters#

id
string Unique identifier of the transfer.
entity
string The name of the entity. Here, it is transfer.
source
string Unique identifier of the transfer source. The source can be a payment or an order.
recipient
string Unique identifier of the transfer destination, that is, the linked account.
amount
integer The amount to be transferred to the linked account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035.
currency
string ISO currency code. We support route transfers only in INR.
amount_reversed
integer Amount reversed from this transfer for refunds.
notes
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
linked_account_notes
array List of keys from the notes object which needs to be shown to linked accounts on their Dashboard.
on_hold
boolean Indicates whether the account settlement for transfer is on hold. Possible values:
  • 1 - Puts the settlement on hold.
  • 0 - Releases the settlement.
on_hold_until
integer Timestamp, in Unix format, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely.
recipient_settlement_id
string Unique identifier of the settlement.
created_at
integer Timestamp, in Unix, at which the record was created.

Once the settlement against the transfer is processed, a webhook settlement.processed is sent which contains a recipient_settlement_id. Refer the sample webhook payload.

Fetch Transfer for an Order#

Use this endpoint to fetch the collection of all transfers created on a specific Order ID.

/orders/:id/?expand[]=transfers

Path Parameter#

id mandatory
string Unique identifier of the Order for which transfers must be retrieved.

Query Parameter#

expand mandatory
array Used to retrieve details regarding the transfers initiated via an order. Supported value is transfers.

Response Parameters#

id

string Unique identifier of the Order created.

entity

string The name of the entity. Here, it is order.

amount

integer The Order amount, in paise. For example, for an amount of ₹299.35, the value of this field should be 29935.

amount_paid

integer The amount paid against the Order.

amount_due

integer The amount pending against the Order.

currency

string The currency in which the order should be created. We support only INR for Route transactions.

receipt

string Unique identifier that you can use for internal reference.

status

string The status of the Order. Possible values:

  • created
  • attempted
  • paid
notes

json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.

created_at

integer Timestamp, in Unix, that indicates when this Order was created.

transfers

Details regarding the transfer.

recipient
string Unique identifier of the linked account to which the transfer is to be made.
amount
integer The amount to be transferred to the linked account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035.This amount cannot exceed the order amount.
currency
string The currency in which the transfer should be made. We support only INR for Route transactions.
notes
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
linked_account_notes
array List of the keys from the notes object which needs to be shown to linked accounts on their dashboard.
on_hold
boolean Indicates whether the account settlement for transfer is on hold. Possible values:
  • 1 - Puts the settlement on hold.
  • 0 - Releases the settlement.
on_hold_until
integer Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely.

Fetch a Transfer#

You can use the following endpoint to fetch details of a specific transfer.

/transfers/:id

Path Parameter#

id mandatory
string Unique identifier of the transfer whose details must be fetched.

Fetch Transfers for a Settlement#

You can use the following endpoint to retrieve the collection of all transfers made for a particular recipient_settlement_id.

/transfers

Query Parameter#

recipient_settlement_id mandatory
string Unique identifier of a settlement obtained from the settlement.processed webhook payload.

Fetch Settlement Details#

You can use the following endpoint to fetch the details of settlements made to linked accounts.

You must append ?expand[]=recipient_settlement as the query parameter to the fetch transfer request. This would return a settlement entity along with the transfer entity.

/transfers?expand[]=recipient_settlement

Query Parameter#

expand mandatory
string Used to retrieve settlement entity along with transfer entity. Supported value is recipient_settlement.

Response Parameters#

id

string Unique identifier of the transfer.

entity

string The name of the entity. Here, it is transfer.

source

string Unique identifier of the transfer source. The source can be a payment or an order.

recipient

string Unique identifier of the transfer destination, that is, the linked account.

amount

integer The amount to be transferred to the linked account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035.

currency

string ISO currency code. We support route transfers only in INR.

amount_reversed

integer Amount reversed from this transfer for refunds.

notes

json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.

on_hold

boolean Indicates whether the account settlement for transfer is on hold. Possible values:

  • 1 - Puts the settlement on hold.
  • 0 - Releases the settlement.
on_hold_until

integer Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely.

recipient_settlement_id

string Unique identifier of the settlement.

recipient_settlement

array

id
string Unique identifier of the settlement received by the linked account.
entity
string Indicates the type of entity. Here, it is settlement.
amount
string The settlement amount represented in the smallest unit of the currency passed.
status
string The status of the settlement. Possible values: -processed - The settlement process was successful. -failed - The settlement process failed.
fee
integer Fee (including GST) charged by Razorpay.
tax
integer GST charged for the payment.
utr
string Unique identifier received for the settlement from the bank.
created_at
integer Timestamp, in Unix, at which the settlement was created.
linked_account_notes

array List of keys from the notes object which needs to be shown to linked accounts on their Dashboard.

created_at

integer Timestamp, in Unix, at which the record was created.

Fetch Payments of a Linked Account#

You can use the following endpoint to fetch a list of all the payments received by a linked account.

/payments/

To achieve this, you need to send the linked account ID in the X-Razorpay-Account API request header, as shown in the cURL example given below.

Response Parameters#

id
string Unique identifier of the payment.
entity
string Indicates the type of entity.
amount
string The payment amount represented in the smallest unit of the currency passed. For example, for an amount of ₹200.35, the value of this field should be 20035.
currency
string The currency in which the payment is made. We support only INR for Route transactions.
status
string The status of the payment. Possible values:
  • created
  • authorized
  • captured
  • refunded
  • failed
method
string The payment method used for making the payment. Here, it will be transfer.
order_id
string Unique identifier of the order associated with the payment.
description
string Description of the payment, if any.
refund_status
string The refund status of the payment. Possible values include:
- null
- partial
- full.
amount_refunded
integer The amount refunded in the smallest unit of the currency passed. For example, if amount_refunded = 100, translates to 100 paise, that is ₹1. INR is the default currency.
captured
boolean Indicates if the payment has been captured.
email
string Customer email address used for the payment.
contact
string Customer contact number used for the payment.
fee
integer Fee (including GST) charged by Razorpay.
tax
integer GST charged for the payment.
error_code
string Code for the error that occurred during payment. For example, BAD_GATEWAY_ERROR.
error_description
string Description of the error that occurred during payment.
notes
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
created_at
integer Timestamp, in Unix, on which the payment was created.

Refunds and Reversals#

You can refund payments to customers and reverse transfers made to linked accounts using the following APIs:

Refund Payments and Reverse Transfer from a Linked Account#

A payment can be refunded to a customer using Refunds API.

When refunding a payment that has transfers, the amount for the refund is deducted from your main account balance. To recover the amount from the linked account, the reverse_all parameter can be set to 1 in the refund POST request. This will recover the amount from the linked account for every transfer made on the payment, before processing the refund to the customer.

Reversals can be automated with the reverse_all attribute in the following refund scenarios:

  • Full refund
  • Partial refund for a payment transferred to a single account.

Note:
For partial refunds on a payment transferred to multiple accounts - the reverse_all parameter cannot be applied, since Razorpay cannot determine which transfer to partially reverse. You will have to use the transfer reversal API to achieve reversals on this payment.

A new reversal entity is created internally and linked for every reversal defined by the transfer_id.

Request Parameters#

amount mandatory
string The amount of refund in the smallest unit of currency. For example, for an amount of ₹200.35, the value of this field should be 20035.
reverse_all optional
boolean Reverses transfer made to a linked account. Possible values:
  • 1 - Reverses transfer made to a linked account.
  • 0 - Does not reverse transfer made to a linked account.

Response Parameters#

id
string Unique identifier of the refund.
entity
string Indicates the type of entity. Here, it is refund.
amount
integer The amount of refund in the smallest unit of currency. For example, for an amount of ₹200.35, the value of this field should be 20035.
currency
string The currency of refund. Currently, only INR is supported.
payment_id
string Unique identifier of the payment for which this refund has been requested.
created_at
integer Timestamp, in Unix, of refund creation.
notes
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.
receipt
string Unique identifier that you can use for internal reference.
acquirer_data
array A dynamic array consisting of a unique reference number (either RRN, ARN or UTR) that is provided by the banking partner when a refund is processed. This reference number can be used by the customer to track the status of the refund with the bank.

Reverse Transfers from all Linked Accounts#

While a transfer moves funds from your account to linked accounts, a reversal can move funds back into your account.

You can use the following endpoint to create reversals on a particular transfer_id.

/transfers/:id/reversals

This creates a reversal entity and reverses the funds transferred from your account to the linked account. Here, the amount specified is debited from the linked account balance and credited to your balance.

Partial reversals are also supported, and multiple reversals can be created on a transfer_id. If the amount parameter is not provided in the request, the entire amount of the transfer is reversed.

Path Parameters#

id mandatory
string Unique identifier of the transfer that must be reversed.

Request Parameters#

amount optional
integer The amount that is to be reversed from the linked account to your account. If this parameter is not passed, the entire transfer amount will be reversed.

Response Parameters#

id
string Unique identifier of the reversal.
entity
string The name of the entity. Here, it is reversal.
transfer_id
string Unique identifier of the transfer that was reversed.
amount
integer The amount that was reversed, in paise.
currency
string ISO currency code. We support route reversals only in INR.
created_at
integer Timestamp, in Unix, that indicates when the reversal was created.

Linked Account Settlements#

You have complete control over settlements to linked accounts. Transfers are settled to linked accounts as per the settlement_period defined for the account. You can also choose to hold account settlements per transfer or per linked account.

Hold Settlements For Transfers#

When transferring a payment to an account, you can choose to put the transfer settlement on hold indefinitely or until a defined time. These settings can be toggled or modified anytime via the API provided, until the settlement is made. When a transfer settlement is put on hold, the settlement for the linked account is deferred until the hold is released.

You can use the following endpoint to create a transfer with settlement configurations:

/payments/:id/transfer

Path Parameter#

id mandatory
string Unique identifier of the payment on which transfers are to be created.

Request Parameters#

transfers

array Enter the details of the transfer.

account mandatory
string Unique identifier of the linked account to which the transfer must be made.
amount mandatory
integer The amount to be transferred to the linked account, in paise. For example, for an amount of ₹200.35, the value of this field should be 20035.
currency mandatory
string The currency used in the transaction. We support only INR for Route transactions.
on_hold optional
boolean Indicates whether the account settlement for transfer is on hold. Possible values:
  • 1- Puts the transfer settlement on hold.
  • 0 - Releases the settlement.
    For example, if the setllement schedule is T+10 days, a transfer made with on_hold set to 1 will not be settled even after 10 days, as it has been put on hold. If the hold is disabled on T+15 day, the amount will be settled to the linked account by the next working day.
on_hold_until optional
integer Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. For example, if a transfer is created with on_hold_until timestamp defined as 1583991784, settlement will be held off until the specified time period. The amount will be settled to the linked account only on the next day.
notes optional
json object Set of key-value pairs that can be associated with an entity. This can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported.

Settlement Schedule Override:
The settlement schedule defined for the linked account takes precedence over the on_hold and on_hold_until functionality. This simply means that defined settlement schedule is the minimum time required for the transfer to be settled.
Examples: For a T+10 settlement schedule:

  • If a transfer was created with on_hold: 1 and then released on day T+7, the settlement will only go out on day T+10.
  • If a transfer was created with on_hold: 1 and on_hold_until: 1491567400 (assume the timestamp 1491567400 corresponds to 7 days after transfer) - then transfer's on_hold will change to false on day T+7, but the settlement will only go out on day T+10.

Modify Settlement Hold for Transfers#

You can use the following endpoint to modify the settlement configuration for a particular transfer_id. On successful request, the API responds with the modified transfer entity.

/transfers/:id

Note:
You cannot change this setting after the transfer has been settled to the linked account.

Path Parameter#

id mandatory
string Unique identifier of the transfer whose settlement configurations are to be modified.

Request Parameters#

on_hold optional
boolean Indicates whether the account settlement for transfer is on hold. Possible values:
  • 1 - Put the transfer settlement on hold.
  • 0 - Releases the settlement.
    For example, if the settlement schedule is T+10 days, a transfer made with on_hold set to 1 will not be settled even after 10 days, as it has been put on hold. If the hold is disabled on T+15 day, the amount will be settled to the linked account by the next working day.
on_hold_until optional
integer Timestamp, in Unix, that indicates until when the settlement of the transfer must be put on hold. If no value is passed, the settlement is put on hold indefinitely. For example, if a transfer is created with on_hold_until timestamp defined as 1583991784, the settlement will be held off until the specified time period. The amount will be settled to the linked account only on the next day.

Available Webhook Events#

There are two webhook events that notify you on route transactions. These are:

  • transfer.processed
  • settlement.processed

Transfer Processed#

Transfers are processed once the order has been paid successfully.

Enable the transfer.processed event to receive notifications whenever a transfer is processed.

Here is a sample payload of the event.

Note:
If you have initiated more than one transfer in an order, separate webhook payloads will be generated for each transfer.

Settlement Processed#

Getting notified about processed settlements gives you more control over the transfers made towards the linked accounts. When a settlement against a transfer is processed, a webhook event called settlement.processed is triggered which notifies your system about the same by sending a POST request to the URL configured on your server. An example payload for this webhook event is given below:

Note:
As the transaction is processed, the payload will include the UTR number.

Learn how to integrate webhooks in your application.

×