API Test keys

API Test keys

Create a Customer Identifier With VPA Receiver

POST
/v1/virtual_accounts

Click to copy

Use this endpoint to create a Customer Identifier with vpa as the receiver type.

Is this page helpful?

Curl

change language

change language

1
curl -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
"vpa"
8
],
9
"vpa": { // Pass this only for custom descriptor.
10
"descriptor": "gaurikumari"
11
}
12
},
13
"description": "Receive payment instalment from Gaurav Kumar- Flat No 105",
14
"customer_id": "cust_BM8NbnFAk1BVDA",
15
"close_by": 1681615838
16
}'

Success

Failure

1
{
2
"id": "va_DzaBLzIz494C64",
3
"name": "Acme Corp",
4
"entity": "virtual_account",
5
"status": "active",
6
"description": "Receive payment instalment from Gaurav Kumar- Flat No 105",
7
"amount_expected": null,
8
"notes": [],
9
"amount_paid": 0,
10
"customer_id": "cust_BM8NbnFAk1BVDA",
11
"receivers": [
12
{
13
"id": "vpa_DzaBM9AEJew8H1",
14
"entity": "vpa",
15
"username": "rpy.payto00000gaurikumari",
16
"handle": "icici",
17
"address": "rpy.payto00000gaurikumari@icici"
18
}
19
],
20
"close_by": 1681615838,
21
"closed_at": null,
22
"created_at": 1577962694
23
}
Request Parameters
receivers

*

json object

Configuration of desired receivers for the Customer Identifier.

Show child parameters (3)

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. Create a customer using the

.

notes
json object

Any 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. 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). 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.

Watch Out!

  • Any request beyond 2147483647 UNIX timestamp will fail.
  • A Customer Identifier API that has not been used for 90 days will be automatically closed even if no close_by date has been set.

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. Know more about

.

customer_id
string

Unique identifier of the customer the Customer Identifier is linked with. Know more about

.

receivers
json object

Configuration 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. 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).

Watch Out!

  • Any request beyond 2147483647 UNIX timestamp will fail.
  • A Customer Identifier API that has not been used for 90 days will be automatically closed even if no close_by date has been set.

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.

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 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 VPA Receiver

POST
/v1/virtual_accounts

Click to copy

Use this endpoint to create a Customer Identifier with vpa as the receiver type.

Is this page helpful?

Request Parameters
receivers

*

json object

Configuration of desired receivers for the Customer Identifier.

Show child parameters (3)

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. Create a customer using the

.

notes
json object

Any 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. 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). 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.

Watch Out!

  • Any request beyond 2147483647 UNIX timestamp will fail.
  • A Customer Identifier API that has not been used for 90 days will be automatically closed even if no close_by date has been set.

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. Know more about

.

customer_id
string

Unique identifier of the customer the Customer Identifier is linked with. Know more about

.

receivers
json object

Configuration 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. 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).

Watch Out!

  • Any request beyond 2147483647 UNIX timestamp will fail.
  • A Customer Identifier API that has not been used for 90 days will be automatically closed even if no close_by date has been set.

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.

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 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

Curl

change language

change language

1
curl -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
"vpa"
8
],
9
"vpa": { // Pass this only for custom descriptor.
10
"descriptor": "gaurikumari"
11
}
12
},
13
"description": "Receive payment instalment from Gaurav Kumar- Flat No 105",
14
"customer_id": "cust_BM8NbnFAk1BVDA",
15
"close_by": 1681615838
16
}'

Success

Failure

1
{
2
"id": "va_DzaBLzIz494C64",
3
"name": "Acme Corp",
4
"entity": "virtual_account",
5
"status": "active",
6
"description": "Receive payment instalment from Gaurav Kumar- Flat No 105",
7
"amount_expected": null,
8
"notes": [],
9
"amount_paid": 0,
10
"customer_id": "cust_BM8NbnFAk1BVDA",
11
"receivers": [
12
{
13
"id": "vpa_DzaBM9AEJew8H1",
14
"entity": "vpa",
15
"username": "rpy.payto00000gaurikumari",
16
"handle": "icici",
17
"address": "rpy.payto00000gaurikumari@icici"
18
}
19
],
20
"close_by": 1681615838,
21
"closed_at": null,
22
"created_at": 1577962694
23
}