API Test Keys
Create a Customer Identifier
POST
/v1/virtual_accounts
Click to copy
Use this endpoint to create a Customer Identifier. While sharing the details of CIs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number 0
and not the letter O. For example, valid IFSC is RATN0VAAPIS
and not RATNOVAAPIS
.
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},10"allowed_payers": [11{12"type": "bank_account",13"bank_account": {14"ifsc": "UTIB0000013",15"account_number": "914010012345679"16}17},18{19"type": "bank_account",20"bank_account": {21"ifsc": "UTIB0000014",22"account_number": "914010012345680"23}24}25],26"description": "Customer Identifier created for Raftar Soft",27"customer_id": "cust_CaVDm8eDRSXYME",28"close_by": 1681615838,29"notes": {30"project_name": "Banking Software"31}32}'
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"allowed_payers": [25{26"type": "bank_account",27"id":"ba_DlGmm9mSj8fjRM",28"bank_account": {29"ifsc": "UTIB0000013",30"account_number": "914010012345679"31}32},33{34"type": "bank_account",35"id":"ba_Cmtnm5tSj6agUW",36"bank_account": {37"ifsc": "UTIB0000014",38"account_number": "914010012345680"39}40}41],42"close_by":1681615838,43"closed_at":null,44"created_at":157483762645}
Request Parameters
receivers
*
json object
Configuration of desired receivers for the Customer Identifier.
Show child parameters (1)
allowed_payers
*
array
Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the
section.Show child parameters (2)
description
string
A brief description of the Customer Identifier.
customer_id
string
Unique identifier of the customer to whom the Customer Identifier must be tagged. Refer to the
documentation to learn how to create a customer.notes
json object
Any custom notes you might want to add to the Customer Identifier can be entered here. Refer to the
to learn more.close_by
integer
UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till 2147483647
in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond 2147483647
UNIX timestamp will fail. While sharing the details of CIs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number 0
and not the letter O. For example, valid IFSC is RATN0VAAPIS
and not RATNOVAAPIS
.
Response Parameters
id
string
The unique identifier of the Customer Identifier.
name
string
The merchant billing label
as it appears on the Dashboard.
entity
string
Indicates the type of entity. Here, it is virtual account
.
status
string
Indicates whether the Customer Identifier is in active
or closed
state.
description
string
A brief description about the Customer Identifier.
amount_expected
integer
The amount expected by the merchant.
amount_paid
integer
The amount paid by the customer into the Customer Identifier.
notes
json object
Any custom notes you might want to add to the Customer Identifier can be entered here. Check the
to know more.customer_id
string
Unique identifier of the customer the Customer Identifier is linked with. Check the
section to know more.receivers
json object
Configuration of desired receivers for the Customer Identifier.
Show child parameters (7)
allowed_payers
array
Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the
section.Show child parameters (3)
close_by
integer
UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till 2147483647
in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond 2147483647
UNIX timestamp will fail.
closed_at
integer
UNIX timestamp at which the Customer Identifier is automatically closed.
created_at
integer
UNIX 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.
-
customer_id
is not correct.
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
only 10 allowed payers can be added
Error Status: 400
Occurs when more than 10 allowed payers are added in the dashboard.
Solution
Account validation is only applicable on bank account as receiver type.
Error Status: 400
This error occurs when you try to add an allowed payer account on a Customer Identifier with VPA added as a receiver (with or without a Bank account).
Solution
The bank account IFSC field is required when the bank is present ( in allowed payers)
Error Status: 400
This error occurs when you do not pass the IFSC code in the request.
Solution
Invalid IFSC OR IFSC must be 11 Characters
Error Status: 400
This error occurs when you pass an incorrect IFSC code in the request. An IFSC must be 11 characters.
Solution
Create a Customer Identifier
POST
/v1/virtual_accounts
Click to copy
Use this endpoint to create a Customer Identifier. While sharing the details of CIs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number 0
and not the letter O. For example, valid IFSC is RATN0VAAPIS
and not RATNOVAAPIS
.
Is this page helpful?
Request Parameters
receivers
*
json object
Configuration of desired receivers for the Customer Identifier.
Show child parameters (1)
allowed_payers
*
array
Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the
section.Show child parameters (2)
description
string
A brief description of the Customer Identifier.
customer_id
string
Unique identifier of the customer to whom the Customer Identifier must be tagged. Refer to the
documentation to learn how to create a customer.notes
json object
Any custom notes you might want to add to the Customer Identifier can be entered here. Refer to the
to learn more.close_by
integer
UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till 2147483647
in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond 2147483647
UNIX timestamp will fail. While sharing the details of CIs (created using RBL bank) with the customers, ensure that the fifth character in the IFSC is number 0
and not the letter O. For example, valid IFSC is RATN0VAAPIS
and not RATNOVAAPIS
.
Response Parameters
id
string
The unique identifier of the Customer Identifier.
name
string
The merchant billing label
as it appears on the Dashboard.
entity
string
Indicates the type of entity. Here, it is virtual account
.
status
string
Indicates whether the Customer Identifier is in active
or closed
state.
description
string
A brief description about the Customer Identifier.
amount_expected
integer
The amount expected by the merchant.
amount_paid
integer
The amount paid by the customer into the Customer Identifier.
notes
json object
Any custom notes you might want to add to the Customer Identifier can be entered here. Check the
to know more.customer_id
string
Unique identifier of the customer the Customer Identifier is linked with. Check the
section to know more.receivers
json object
Configuration of desired receivers for the Customer Identifier.
Show child parameters (7)
allowed_payers
array
Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the
section.Show child parameters (3)
close_by
integer
UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till 2147483647
in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond 2147483647
UNIX timestamp will fail.
closed_at
integer
UNIX timestamp at which the Customer Identifier is automatically closed.
created_at
integer
UNIX 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.
-
customer_id
is not correct.
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
only 10 allowed payers can be added
Error Status: 400
Occurs when more than 10 allowed payers are added in the dashboard.
Solution
Account validation is only applicable on bank account as receiver type.
Error Status: 400
This error occurs when you try to add an allowed payer account on a Customer Identifier with VPA added as a receiver (with or without a Bank account).
Solution
The bank account IFSC field is required when the bank is present ( in allowed payers)
Error Status: 400
This error occurs when you do not pass the IFSC code in the request.
Solution
Invalid IFSC OR IFSC must be 11 Characters
Error Status: 400
This error occurs when you pass an incorrect IFSC code in the request. An IFSC must be 11 characters.
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},10"allowed_payers": [11{12"type": "bank_account",13"bank_account": {14"ifsc": "UTIB0000013",15"account_number": "914010012345679"16}17},18{19"type": "bank_account",20"bank_account": {21"ifsc": "UTIB0000014",22"account_number": "914010012345680"23}24}25],26"description": "Customer Identifier created for Raftar Soft",27"customer_id": "cust_CaVDm8eDRSXYME",28"close_by": 1681615838,29"notes": {30"project_name": "Banking Software"31}32}'
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"allowed_payers": [25{26"type": "bank_account",27"id":"ba_DlGmm9mSj8fjRM",28"bank_account": {29"ifsc": "UTIB0000013",30"account_number": "914010012345679"31}32},33{34"type": "bank_account",35"id":"ba_Cmtnm5tSj6agUW",36"bank_account": {37"ifsc": "UTIB0000014",38"account_number": "914010012345680"39}40}41],42"close_by":1681615838,43"closed_at":null,44"created_at":157483762645}