Smart Collect Integration🔗
Your Virtual Account integration will likely work in one of the following ways:
- By mapping your customers/orders to Razorpay virtual account IDs.
- By mapping your customers/orders to Razorpay customer IDs.
- By mapping your customers/orders to virtual bank account numbers.
- By mapping your customers/orders to your own reference identifiers, which you passed in the notes array of your virtual account creation request.
In each of these cases, the Razorpay virtual_account.credited
webhook is responsible for informing your server about which order to fulfill.
Copy{
"entity": "event",
"account_id": "acc_BFQ7uQEaa7j2z7",
"event": "virtual_account.credited",
"contains": [
"payment",
"virtual_account",
"bank_transfer"
],
"payload": {
"payment": {
"entity": {
"id": "pay_DETA2KrOlhqQzF",
"entity": "payment",
"amount": 61900,
"currency": "INR",
"status": "captured",
"order_id": null,
"invoice_id": null,
"international": false,
"method": "bank_transfer",
"amount_refunded": 0,
"amount_transferred": 0,
"refund_status": null,
"captured": true,
"description": "NA",
"card_id": null,
"bank": null,
"wallet": null,
"vpa": null,
"email": "gaurav.kumar@example.com",
"contact": "+919123456789",
"customer_id": "cust_BtQNqzmBlAXyTY",
"notes": [],
"fee": 731,
"tax": 112,
"error_code": null,
"error_description": null,
"created_at": 1567675983
}
},
"virtual_account": {
"entity": {
"id": "va_DET8z3wBxfPB5L",
"name": "Acme Corp",
"entity": "virtual_account",
"status": "active",
"description": "Virtual Account to test webhook",
"amount_expected": null,
"notes": {
"internal_order_id": "12345"
},
"amount_paid": 0,
"customer_id": "cust_BtQNqzmBlAXyTY",
"receivers": [
{
"id": "ba_DET8z5Z5ghv4hW",
"entity": "bank_account",
"ifsc": "YESB0CMSN5C",
"bank_name": "Yes Bank",
"name": "Acme Corp",
"notes": [],
"account_number": "2223330012341234"
}
],
"close_by": null,
"closed_at": null,
"created_at": 1567675923
}
},
"bank_transfer": {
"entity": {
"id": "bt_DETA2KSUJ3uCM9",
"entity": "bank_transfer",
"payment_id": "pay_DETA2KrOlhqQzF",
"mode": "NEFT",
"bank_reference": "156767598340",
"amount": 61900,
"payer_bank_account": {
"id": "ba_DETA2UuuKtKLR1",
"entity": "bank_account",
"ifsc": "KKBK0000007",
"bank_name": "Kotak Mahindra Bank",
"name": "Saurav Kumar",
"account_number": "765432123456789"
},
"virtual_account_id": "va_DET8z3wBxfPB5L"
}
}
},
"created_at": 1567675983
}
Reconciliation ID | Example | Location in credit webhook |
---|---|---|
Razorpay virtual account ID |
|
|
Razorpay customer ID |
|
|
Virtual bank account number |
|
|
Virtual Account Notes ID |
|
|
The webhook payload for the migrated virtual accounts will look like this.
Copy{
"entity": "event",
"account_id": "acc_BFQ7uQEaa7j2z7",
"event": "virtual_account.credited",
"contains": [
"payment",
"virtual_account",
"bank_transfer"
],
"payload": {
"payment": {
"entity": {
"id": "pay_DETA2KrOlhqQzF",
"entity": "payment",
"amount": 61900,
"currency": "INR",
"status": "captured",
"order_id": null,
"invoice_id": null,
"international": false,
"method": "bank_transfer",
"amount_refunded": 0,
"amount_transferred": 0,
"refund_status": null,
"captured": true,
"description": "NA",
"card_id": null,
"bank": null,
"wallet": null,
"vpa": null,
"email": "gaurav.kumar@example.com",
"contact": "+919123456789",
"customer_id": "cust_BtQNqzmBlAXyTY",
"notes": [],
"fee": 731,
"tax": 112,
"error_code": null,
"error_description": null,
"created_at": 1567675983
}
},
"virtual_account": {
"entity": {
"id": "va_DET8z3wBxfPB5L",
"name": "Acme Corp",
"entity": "virtual_account",
"status": "active",
"description": "Virtual Account to test webhook",
"amount_expected": null,
"notes": {
"internal_order_id": "12345"
},
"amount_paid": 0,
"customer_id": "cust_BtQNqzmBlAXyTY",
"receivers": [
{
"id": "ba_DET8z5Z5ghv4hW",
"entity": "bank_account",
"ifsc": "YESB0CMSN5C",
"bank_name": "Yes Bank",
"name": "Acme Corp",
"notes": [],
"account_number": "2223330012341234"
},
{
"id": "ba_EPf3KwRHCgEnum",
"entity": "bank_account",
"ifsc": "RATN0VAAPIS",
"bank_name": "RBL Bank",
"name": "Acme Corp",
"notes": [],
"account_number": "2223330012341234"
}
],
"close_by": null,
"closed_at": null,
"created_at": 1567675923
}
},
"bank_transfer": {
"entity": {
"id": "bt_DETA2KSUJ3uCM9",
"entity": "bank_transfer",
"payment_id": "pay_DETA2KrOlhqQzF",
"mode": "NEFT",
"bank_reference": "156767598340",
"amount": 61900,
"payer_bank_account": {
"id": "ba_DETA2UuuKtKLR1",
"entity": "bank_account",
"ifsc": "KKBK0000007",
"bank_name": "Kotak Mahindra Bank",
"name": "Saurav Kumar",
"account_number": "765432123456789"
},
"virtual_account_id": "va_DET8z3wBxfPB5L"
}
}
},
"created_at": 1567675983
}
As you can see, while a new bank account receiver block has been added to the receivers array of the virtual account, all considered reconciliation IDs are still present in the Razorpay webhook, in the same location.
Notably, since the old receiver is still a part of the webhook, your server will still be correctly notified of the virtual account that received the payment, and of the order on your end that needs to be fulfilled.
This means as long as your integration uses one of the 4 considered identifiers for payment reconciliation, it does not require any changes.