Create Transfers From Payments
POST
/v1/payments/:id/transfers
Click to copy
Use this endpoint to create Transfers from captured payments. You can create and capture payments in the regular payments flow using the
and .You should perform additional steps to disburse payments using Razorpay Route.
- The customer pays the amount using the standard payment flow.
- Once the payment is
captured
, you can initiate a transfer to Linked Accounts with a transfer API call. You have to pass the details such asaccount_id
andamount
.
Is this page helpful?
1curl -X POST https://api.razorpay.com/v1/payments/pay_E8JR8E0XyjUSZd/transfers \2-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]3-H 'content-type: application/json'4-d '{5"transfers": [6{7"account": "acc_IROu8Nod6PXPtZ",8"amount": 100,9"currency": "INR",10"notes": {11"name": "Gaurav Kumar",12"roll_no": "IEC2011025"13},14"linked_account_notes": [15"roll_no"16],17"on_hold": true,18"on_hold_until": 167122287019},20{21"account": "acc_IRQWUleX4BqvYn",22"amount": 300,23"currency": "INR",24"notes": {25"name": "Saurav Kumar",26"roll_no": "IEC2011026"27},28"linked_account_notes": [29"roll_no"30],31"on_hold": false32}33]34}'
Success
Failure
1{2"entity": "collection",3"count": 2,4"items": [5{6"id": "trf_JJD535tJtk6Yy0",7"entity": "transfer",8"status": "pending",9"source": "pay_JGmCgTEa9OTQcX",10"recipient": "acc_IROu8Nod6PXPtZ",11"amount": 100,12"currency": "INR",13"amount_reversed": 0,14"notes": {15"name": "Gaurav Kumar",16"roll_no": "IEC2011025"17},18"linked_account_notes": [19"roll_no"20],21"on_hold": true,22"on_hold_until": 1671222870,23"recipient_settlement_id": null,24"created_at": 1649933574,25"processed_at": null,26"error": {27"code": null,28"description": null,29"reason": null,30"field": null,31"step": null,32"id": "trf_JJD535tJtk6Yy0",33"source": null,34"metadata": null35}36},37{38"id": "trf_JJD536GI6wuz3m",39"entity": "transfer",40"status": "pending",41"source": "pay_JGmCgTEa9OTQcX",42"recipient": "acc_IRQWUleX4BqvYn",43"amount": 300,44"currency": "INR",45"amount_reversed": 0,46"notes": {47"name": "Saurav Kumar",48"roll_no": "IEC2011026"49},50"linked_account_notes": [51"roll_no"52],53"on_hold": false,54"on_hold_until": null,55"recipient_settlement_id": null,56"created_at": 1649933574,57"processed_at": null,58"error": {59"code": null,60"description": null,61"reason": null,62"field": null,63"step": null,64"id": "trf_JJD536GI6wuz3m",65"source": null,66"metadata": null67}68}69]70}
Path Parameters
id
*
string
Unique identifier of the payment on which the transfer must be created.
Request Parameters
transfers
array
Details regarding the transfer.
Show child parameters (7)
Response Parameters
id
string
Unique identifier of the transfer.
entity
string
The name of the entity. Here, it is transfer
.
transfer_status
string
The status of the transfer. Possible values are:
created
pending
processed
failed
reversed
partially_reversed
settlement_status
string
The status of the settlement. Possible values are:
pending
on_hold
settled
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. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, "region": "south", "city": "Bangalore"
.
error
string
Provides error details that may occur during transfers.
Show child parameters (7)
linked_account_notes
array
List of keys from the notes
object which needs to be shown to Linked Accounts on their Dashboard. For example, "region", "city"
. Only the keys will be shown, not values.
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, 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.
Errors
The api key/secret provided is invalid
Error Status: 4xx
This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard.
Solution
The transfers.0.amount must be at least 100.
Error Status: 400
This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to 100.
Solution
The input field is required
Error Status: 400
This error occurs when a mandatory field is empty.
Solution
payment_id is not a valid id
Error Status: 400
This error occurs when you pass an invalid payment_id
in the API endpoint.
Solution
The id provided does not exist
Error Status: 400
This error occurs when there is a miss-match between the API keys via which the transaction was initiated for that particular payment_id
and the API keys passed in the API call.
Solution
input is an invalid account_code.
Error Status: 400
This error occurs when the account_code
passed is invalid or does not belong to the requested merchant.
Solution
Transfer cannot be made due to insufficient balance
Error Status: 400
This error occurs when the total balance is less than or equal to the transfer amount.
Solution
The sum of amount requested for transfer is greater than the captured amount
Error Status: 400
This error occurs when the total transferred amount exceeds the captured payment amount.
Solution
Create Transfers From Payments
POST
/v1/payments/:id/transfers
Click to copy
Use this endpoint to create Transfers from captured payments. You can create and capture payments in the regular payments flow using the
and .You should perform additional steps to disburse payments using Razorpay Route.
- The customer pays the amount using the standard payment flow.
- Once the payment is
captured
, you can initiate a transfer to Linked Accounts with a transfer API call. You have to pass the details such asaccount_id
andamount
.
Is this page helpful?
Path Parameters
id
*
string
Unique identifier of the payment on which the transfer must be created.
Request Parameters
transfers
array
Details regarding the transfer.
Show child parameters (7)
Response Parameters
id
string
Unique identifier of the transfer.
entity
string
The name of the entity. Here, it is transfer
.
transfer_status
string
The status of the transfer. Possible values are:
created
pending
processed
failed
reversed
partially_reversed
settlement_status
string
The status of the settlement. Possible values are:
pending
on_hold
settled
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. These pairs can be useful for storing additional information about the entity. A maximum of 15 key-value pairs, each of 256 characters (maximum), are supported. For example, "region": "south", "city": "Bangalore"
.
error
string
Provides error details that may occur during transfers.
Show child parameters (7)
linked_account_notes
array
List of keys from the notes
object which needs to be shown to Linked Accounts on their Dashboard. For example, "region", "city"
. Only the keys will be shown, not values.
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, 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.
Errors
The api key/secret provided is invalid
Error Status: 4xx
This error occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard.
Solution
The transfers.0.amount must be at least 100.
Error Status: 400
This error occurs when the amount is less than the minimum amount. The transaction amount expressed in the currency subunit, such as paise (in INR) should always be greater than or equal to 100.
Solution
The input field is required
Error Status: 400
This error occurs when a mandatory field is empty.
Solution
payment_id is not a valid id
Error Status: 400
This error occurs when you pass an invalid payment_id
in the API endpoint.
Solution
The id provided does not exist
Error Status: 400
This error occurs when there is a miss-match between the API keys via which the transaction was initiated for that particular payment_id
and the API keys passed in the API call.
Solution
input is an invalid account_code.
Error Status: 400
This error occurs when the account_code
passed is invalid or does not belong to the requested merchant.
Solution
Transfer cannot be made due to insufficient balance
Error Status: 400
This error occurs when the total balance is less than or equal to the transfer amount.
Solution
The sum of amount requested for transfer is greater than the captured amount
Error Status: 400
This error occurs when the total transferred amount exceeds the captured payment amount.
Solution
1curl -X POST https://api.razorpay.com/v1/payments/pay_E8JR8E0XyjUSZd/transfers \2-u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]3-H 'content-type: application/json'4-d '{5"transfers": [6{7"account": "acc_IROu8Nod6PXPtZ",8"amount": 100,9"currency": "INR",10"notes": {11"name": "Gaurav Kumar",12"roll_no": "IEC2011025"13},14"linked_account_notes": [15"roll_no"16],17"on_hold": true,18"on_hold_until": 167122287019},20{21"account": "acc_IRQWUleX4BqvYn",22"amount": 300,23"currency": "INR",24"notes": {25"name": "Saurav Kumar",26"roll_no": "IEC2011026"27},28"linked_account_notes": [29"roll_no"30],31"on_hold": false32}33]34}'
Success
Failure
1{2"entity": "collection",3"count": 2,4"items": [5{6"id": "trf_JJD535tJtk6Yy0",7"entity": "transfer",8"status": "pending",9"source": "pay_JGmCgTEa9OTQcX",10"recipient": "acc_IROu8Nod6PXPtZ",11"amount": 100,12"currency": "INR",13"amount_reversed": 0,14"notes": {15"name": "Gaurav Kumar",16"roll_no": "IEC2011025"17},18"linked_account_notes": [19"roll_no"20],21"on_hold": true,22"on_hold_until": 1671222870,23"recipient_settlement_id": null,24"created_at": 1649933574,25"processed_at": null,26"error": {27"code": null,28"description": null,29"reason": null,30"field": null,31"step": null,32"id": "trf_JJD535tJtk6Yy0",33"source": null,34"metadata": null35}36},37{38"id": "trf_JJD536GI6wuz3m",39"entity": "transfer",40"status": "pending",41"source": "pay_JGmCgTEa9OTQcX",42"recipient": "acc_IRQWUleX4BqvYn",43"amount": 300,44"currency": "INR",45"amount_reversed": 0,46"notes": {47"name": "Saurav Kumar",48"roll_no": "IEC2011026"49},50"linked_account_notes": [51"roll_no"52],53"on_hold": false,54"on_hold_until": null,55"recipient_settlement_id": null,56"created_at": 1649933574,57"processed_at": null,58"error": {59"code": null,60"description": null,61"reason": null,62"field": null,63"step": null,64"id": "trf_JJD536GI6wuz3m",65"source": null,66"metadata": null67}68}69]70}