API Test Keys
Create a Linked Account
POST
/v2/accounts
Click to copy
Use this endpoint to create a Linked Account.
Is this page helpful?
1curl -X POST 'https://api.razorpay.com/v2/accounts' \2-u [YOUR_KEY_ID]:[YOUR_SECRET] \3-H "Content-type: application/json" \4-d '{5"email":"gaurav.kumar@example.com",6"phone":"9000090000",7"type":"route",8"reference_id":"124124",9"legal_business_name":"Acme Corp",10"business_type":"partnership",11"contact_name":"Gaurav Kumar",12"profile":{13"category":"healthcare",14"subcategory":"clinic",15"addresses":{16"registered":{17"street1":"507, Koramangala 1st block",18"street2":"MG Road",19"city":"Bengaluru",20"state":"KARNATAKA",21"postal_code":"560034",22"country":"IN"23}24}25},26"legal_info":{27"pan":"AAACL1234C",28"gst":"18AABCU9603R1ZM"29}30}'
Success
Failure
1{2"id":"acc_GRWKk7qQsLnDjX",3"type":"route",4"status":"created",5"email":"gaurav.kumar@example.com",6"profile":{7"category":"healthcare",8"subcategory":"clinic",9"addresses":{10"registered":{11"street1":"507, Koramangala 1st block",12"street2":"MG Road",13"city":"Bengaluru",14"state":"KARNATAKA",15"postal_code":"560034",16"country":"IN"17}18}19},20"notes":[2122],23"created_at":1611136837,24"phone":"9000090000",25"contact_name":"Gaurav Kumar",26"reference_id":"124124",27"business_type":"partnership",28"legal_business_name":"Acme Corp",29"customer_facing_business_name":"Acme Corp",30"legal_info":{31"pan":"AAACL1234C",32"gst":"18AABCU9603R1ZM"33}34}
Request Parameters
email
*
string
The Linked Account's business email address.
phone
*
integer
The Linked Account's business phone number. The minimum length is 8 characters and the maximum length is 15.
legal_business_name
*
string
The name of the Linked Account's business. For example, Acme Corp
. The minimum length is 4 characters and the maximum length is 200.
customer_facing_business_name
string
The Linked Account billing label as it appears on the Razorpay Dashboard. The minimum length is 1 character and the maximum length is 255.
business_type
*
string
The type of business operated by the Linked Account holder. List of possible values are available
.reference_id
string
Partner's external account reference id. The minimum length is 1 character and the maximum length is 512.
profile
object
The business details of the Linked Account's account.
Show child parameters (4)
legal_info
object
The legal details about the Linked Account's business. The mandatory
parameters should be passed depending on the business requirements.Show child parameters (2)
contact_info
object
Options available for contact support.
Show child parameters (3)
apps
object
The app details of the account holder's business.
Show child parameters (3)
Response Parameters
id
string
The unique identifier of the account generated by Razorpay. The maximum length is 18 characters. For example, acc_GLGeLkU2JUeyDZ
.
type
string
The account type. Possible value is route
.
reference_id
string
The internal reference ID. This value can be maximum of 20 characters. For example, 123123
.
status
string
The status of the account. Possible values:
created
suspended
email
string
The account holder's email address.
phone
integer
The account holder's phone number. The minimum length is 8 characters and the maximum length is 15.
legal_business_name
string
The name of the account holder's business. For example, Acme Corp
. The minimum length is 4 characters and the maximum length is 200.
business_type
string
The type of business operated by the account holder. Possible values:
.profile
object
The account holder's business details.
Show child parameters (3)
legal_info
object
The legal details about the account holder's business. The mandatory
parameters should be passed depending on the business requirements.Show child parameters (2)
notes
object
Contains user-defined fields stored by the partner for reference purposes.
contact_name
string
The name of the contact. The minimum length is 4 and the maximum length is 255 characters.
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 input field is required
Error Status: 400
This error occurs when a mandatory field is empty.
Solution
The requested URL was not found on the server.
Error Status: 400
This error occurs when Marketplace feature is not enabled for merchants using private auth.
Solution
Invalid type: route
Error Status: 400
This error occurs when the value of a parameter is invalid. For example, when the value of the type
parameter is other than route
.
Solution
Route code Support feature not enabled to add account code.
Error Status: 400
This error occurs when you pass the value for the reference_id
parameter, but the route_code_support
feature is not enabled for merchants.
Solution
Merchant email already exists for account - BbHKlnuyZkf0xa.
Error Status: 400
This error occurs when you try to create a Linked Account with an existing email address.
Solution
Invalid IFSC Code
Error Status: 400
This error occurs when you pass an invalid IFSC code.
Solution
The name may only contain alphabets, digits and spaces
Error Status: 400
This error occurs when the name field has anything other than alphabets, digits and spaces.
Solution
The bank account number must be between 5 and 35 characters
Error Status: 400
This error occurs when you pass an invalid bank account number.
Solution
Account_code -account_code is not allowed for this merchant
Error Status: 400
This error occurs when the account_code
feature is not enabled for the merchant.
Solution
Please enter a valid name. Links, emails and HTML tags are not allowed.
Error Status: 400
This error occurs when the Linked Account name contains URLs, HTML tags, emails and so on.
Solution
The code format is invalid.
Error Status: 400
This error occurs when the reference_id
format is invalid.
Solution
The code must be at least 3 characters.
Error Status: 400
This error occurs when the reference_id
value has less than a minimum of 3 characters.
Solution
Create a Linked Account
POST
/v2/accounts
Click to copy
Use this endpoint to create a Linked Account.
Is this page helpful?
Request Parameters
email
*
string
The Linked Account's business email address.
phone
*
integer
The Linked Account's business phone number. The minimum length is 8 characters and the maximum length is 15.
legal_business_name
*
string
The name of the Linked Account's business. For example, Acme Corp
. The minimum length is 4 characters and the maximum length is 200.
customer_facing_business_name
string
The Linked Account billing label as it appears on the Razorpay Dashboard. The minimum length is 1 character and the maximum length is 255.
business_type
*
string
The type of business operated by the Linked Account holder. List of possible values are available
.reference_id
string
Partner's external account reference id. The minimum length is 1 character and the maximum length is 512.
profile
object
The business details of the Linked Account's account.
Show child parameters (4)
legal_info
object
The legal details about the Linked Account's business. The mandatory
parameters should be passed depending on the business requirements.Show child parameters (2)
contact_info
object
Options available for contact support.
Show child parameters (3)
apps
object
The app details of the account holder's business.
Show child parameters (3)
Response Parameters
id
string
The unique identifier of the account generated by Razorpay. The maximum length is 18 characters. For example, acc_GLGeLkU2JUeyDZ
.
type
string
The account type. Possible value is route
.
reference_id
string
The internal reference ID. This value can be maximum of 20 characters. For example, 123123
.
status
string
The status of the account. Possible values:
created
suspended
email
string
The account holder's email address.
phone
integer
The account holder's phone number. The minimum length is 8 characters and the maximum length is 15.
legal_business_name
string
The name of the account holder's business. For example, Acme Corp
. The minimum length is 4 characters and the maximum length is 200.
business_type
string
The type of business operated by the account holder. Possible values:
.profile
object
The account holder's business details.
Show child parameters (3)
legal_info
object
The legal details about the account holder's business. The mandatory
parameters should be passed depending on the business requirements.Show child parameters (2)
notes
object
Contains user-defined fields stored by the partner for reference purposes.
contact_name
string
The name of the contact. The minimum length is 4 and the maximum length is 255 characters.
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 input field is required
Error Status: 400
This error occurs when a mandatory field is empty.
Solution
The requested URL was not found on the server.
Error Status: 400
This error occurs when Marketplace feature is not enabled for merchants using private auth.
Solution
Invalid type: route
Error Status: 400
This error occurs when the value of a parameter is invalid. For example, when the value of the type
parameter is other than route
.
Solution
Route code Support feature not enabled to add account code.
Error Status: 400
This error occurs when you pass the value for the reference_id
parameter, but the route_code_support
feature is not enabled for merchants.
Solution
Merchant email already exists for account - BbHKlnuyZkf0xa.
Error Status: 400
This error occurs when you try to create a Linked Account with an existing email address.
Solution
Invalid IFSC Code
Error Status: 400
This error occurs when you pass an invalid IFSC code.
Solution
The name may only contain alphabets, digits and spaces
Error Status: 400
This error occurs when the name field has anything other than alphabets, digits and spaces.
Solution
The bank account number must be between 5 and 35 characters
Error Status: 400
This error occurs when you pass an invalid bank account number.
Solution
Account_code -account_code is not allowed for this merchant
Error Status: 400
This error occurs when the account_code
feature is not enabled for the merchant.
Solution
Please enter a valid name. Links, emails and HTML tags are not allowed.
Error Status: 400
This error occurs when the Linked Account name contains URLs, HTML tags, emails and so on.
Solution
The code format is invalid.
Error Status: 400
This error occurs when the reference_id
format is invalid.
Solution
The code must be at least 3 characters.
Error Status: 400
This error occurs when the reference_id
value has less than a minimum of 3 characters.
Solution
1curl -X POST 'https://api.razorpay.com/v2/accounts' \2-u [YOUR_KEY_ID]:[YOUR_SECRET] \3-H "Content-type: application/json" \4-d '{5"email":"gaurav.kumar@example.com",6"phone":"9000090000",7"type":"route",8"reference_id":"124124",9"legal_business_name":"Acme Corp",10"business_type":"partnership",11"contact_name":"Gaurav Kumar",12"profile":{13"category":"healthcare",14"subcategory":"clinic",15"addresses":{16"registered":{17"street1":"507, Koramangala 1st block",18"street2":"MG Road",19"city":"Bengaluru",20"state":"KARNATAKA",21"postal_code":"560034",22"country":"IN"23}24}25},26"legal_info":{27"pan":"AAACL1234C",28"gst":"18AABCU9603R1ZM"29}30}'
Success
Failure
1{2"id":"acc_GRWKk7qQsLnDjX",3"type":"route",4"status":"created",5"email":"gaurav.kumar@example.com",6"profile":{7"category":"healthcare",8"subcategory":"clinic",9"addresses":{10"registered":{11"street1":"507, Koramangala 1st block",12"street2":"MG Road",13"city":"Bengaluru",14"state":"KARNATAKA",15"postal_code":"560034",16"country":"IN"17}18}19},20"notes":[2122],23"created_at":1611136837,24"phone":"9000090000",25"contact_name":"Gaurav Kumar",26"reference_id":"124124",27"business_type":"partnership",28"legal_business_name":"Acme Corp",29"customer_facing_business_name":"Acme Corp",30"legal_info":{31"pan":"AAACL1234C",32"gst":"18AABCU9603R1ZM"33}34}