API Test Keys
Create a Customer Identifier With Bank Account Receiver
POST/v1/virtual_accountsClick to copy
Use this endpoint to create a Customer Identifier with bank account receiver type.
Is this page helpful?
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X POST https://api.razorpay.com/v1/virtual_accounts \3-H "Content-Type: application/json" \4-d '{5"receivers": {6"types": [7"bank_account"8],9"bank_account": {10"descriptor": "1234567890"11}12},13"description": "Customer Identifier created for Raftar Soft",14"customer_id": "cust_CaVDm8eDRSXYME",15"close_by": 1681615838,16"notes": {17"project_name": "Banking Software"18}19}'
Success
Failure
1{2"id":"va_DlGmm7jInLudH9",3"name":"Acme Corp",4"entity":"virtual_account",5"status":"active",6"description":"Customer Identifier created for Raftar Soft",7"amount_expected":null,8"notes":{9"project_name":"Banking Software"10},11"amount_paid":0,12"customer_id":"cust_CaVDm8eDRSXYME",13"receivers":[14{15"id":"ba_DlGmm9mSj8fjRM",16"entity":"bank_account",17"ifsc":"RATN0VAAPIS",18"bank_name": "RBL Bank",19"name":"Acme Corp",20"notes":[],21"account_number":"2223330099089860"22}23],24"close_by":1681615838,25"closed_at":null,26"created_at":157483762627}
Request Parameters
receivers *
json objectConfiguration of desired receivers for the Customer Identifier.
Show child parameters (3)
description stringA brief description of the Customer Identifier.
customer_id stringUnique identifier of the customer to whom the Customer Identifier must be tagged. Create a customer using the
.notes json objectAny custom notes you might want to add to the Customer Identifier can be entered here. Know more about
.close_by integer UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, 1681615838. This needs to be passed only if you want the Customer Identifier to be temporary and auto-deleted after a specific usage time.
Watch Out!
- While sharing the details of Customer Identifiers (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number
0and not the letter O. For example, valid IFSC isRATN0VAAPISand notRATNOVAAPIS. - A Customer Identifier will close automatically only if the UNIX timestamp is passed in the
close_byrequest parameter.
Response Parameters
idstringThe unique identifier of the Customer Identifier.
namestring The merchant billing label as it appears on the Dashboard.
entitystring Indicates the type of entity. Here, it is virtual account.
statusstring Indicates whether the Customer Identifier is in active or closed state.
descriptionstringA brief description about the Customer Identifier.
amount_expectedintegerThe amount expected by the merchant.
amount_paidintegerThe amount paid by the customer into the Customer Identifier.
notesjson objectAny custom notes you might want to add to the Customer Identifier can be entered here. Know more about
.customer_idstringUnique identifier of the customer the Customer Identifier is linked with. Know more about
.receiversjson objectConfiguration of desired receivers for the Customer Identifier.
Show child parameters (10)
close_by integer UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, 1681615838. This is returned only if the UNIX timestamp was specified during the Customer Identifier creation. There is no expiry time for a Customer Identifier unless specified during creation.
closed_atintegerUNIX timestamp at which the Customer Identifier is automatically closed.
created_atintegerUNIX timestamp at which the Customer Identifier was created.
Errors
The api <key/secret> provided is invalid
Error Status: 4xx
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 field name is required
Error Status: 400
Occurs when a mandatory field is empty.
Solution
The id provided does not exist
Error Status: 400
Occurs when the customer_id passed is wrong or does not belong to the identifier associated to the API Keys used.
Solution
Receivers field is required
Error Status: 400
Occurs when the receivers field is empty.
Solution
An active Customer Identifier with the same descriptor already exists for your account.
Error Status: 400
The description provided by you already exists for another account.
Solution
Create a Customer Identifier With Bank Account Receiver
POST/v1/virtual_accountsClick to copy
Use this endpoint to create a Customer Identifier with bank account receiver type.
Is this page helpful?
Request Parameters
receivers *
json objectConfiguration of desired receivers for the Customer Identifier.
Show child parameters (3)
description stringA brief description of the Customer Identifier.
customer_id stringUnique identifier of the customer to whom the Customer Identifier must be tagged. Create a customer using the
.notes json objectAny custom notes you might want to add to the Customer Identifier can be entered here. Know more about
.close_by integer UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, 1681615838. This needs to be passed only if you want the Customer Identifier to be temporary and auto-deleted after a specific usage time.
Watch Out!
- While sharing the details of Customer Identifiers (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number
0and not the letter O. For example, valid IFSC isRATN0VAAPISand notRATNOVAAPIS. - A Customer Identifier will close automatically only if the UNIX timestamp is passed in the
close_byrequest parameter.
Response Parameters
idstringThe unique identifier of the Customer Identifier.
namestring The merchant billing label as it appears on the Dashboard.
entitystring Indicates the type of entity. Here, it is virtual account.
statusstring Indicates whether the Customer Identifier is in active or closed state.
descriptionstringA brief description about the Customer Identifier.
amount_expectedintegerThe amount expected by the merchant.
amount_paidintegerThe amount paid by the customer into the Customer Identifier.
notesjson objectAny custom notes you might want to add to the Customer Identifier can be entered here. Know more about
.customer_idstringUnique identifier of the customer the Customer Identifier is linked with. Know more about
.receiversjson objectConfiguration of desired receivers for the Customer Identifier.
Show child parameters (10)
close_by integer UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. For example, 1681615838. This is returned only if the UNIX timestamp was specified during the Customer Identifier creation. There is no expiry time for a Customer Identifier unless specified during creation.
closed_atintegerUNIX timestamp at which the Customer Identifier is automatically closed.
created_atintegerUNIX timestamp at which the Customer Identifier was created.
Errors
The api <key/secret> provided is invalid
Error Status: 4xx
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 field name is required
Error Status: 400
Occurs when a mandatory field is empty.
Solution
The id provided does not exist
Error Status: 400
Occurs when the customer_id passed is wrong or does not belong to the identifier associated to the API Keys used.
Solution
Receivers field is required
Error Status: 400
Occurs when the receivers field is empty.
Solution
An active Customer Identifier with the same descriptor already exists for your account.
Error Status: 400
The description provided by you already exists for another account.
Solution
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X POST https://api.razorpay.com/v1/virtual_accounts \3-H "Content-Type: application/json" \4-d '{5"receivers": {6"types": [7"bank_account"8],9"bank_account": {10"descriptor": "1234567890"11}12},13"description": "Customer Identifier created for Raftar Soft",14"customer_id": "cust_CaVDm8eDRSXYME",15"close_by": 1681615838,16"notes": {17"project_name": "Banking Software"18}19}'
Success
Failure
1{2"id":"va_DlGmm7jInLudH9",3"name":"Acme Corp",4"entity":"virtual_account",5"status":"active",6"description":"Customer Identifier created for Raftar Soft",7"amount_expected":null,8"notes":{9"project_name":"Banking Software"10},11"amount_paid":0,12"customer_id":"cust_CaVDm8eDRSXYME",13"receivers":[14{15"id":"ba_DlGmm9mSj8fjRM",16"entity":"bank_account",17"ifsc":"RATN0VAAPIS",18"bank_name": "RBL Bank",19"name":"Acme Corp",20"notes":[],21"account_number":"2223330099089860"22}23],24"close_by":1681615838,25"closed_at":null,26"created_at":157483762627}