A virtual bank account is a unique account number which is generated so you don’t need to share your sensitive bank account details with your users. A virtual bank account can be paid with ACH credit or wire transfer. Users can make payment of the amount due to this account, and the amount will be matched with the invoice.

Sample virtual bank account [ JSON ]

{ "id": "vba_5SK0b8vNQtyvEl98P", "email": "jane@test.com", "bank_name": "TEST BANK", "account_number": "test_fe44816c8682", "routing_number": "110000000", "swift_code": "TSTEZ122", "gateway": "stripe", "gateway_account_id": "gw_5SK0b8vNQtyvEg38O", "deleted": false, "object": "virtual_bank_account", "customer_id": "4gkYnd21ouvW", "reference_id": "cus_CWoNXpK2VvGgzC/src_CWoNzGgWNsbreG" }
id
Identifier of the virtual bank account.
string, max chars=40
customer_id
Identifier of the customer.
string, max chars=50
email
Email address associated with the virtual bank account.
string, max chars=70
bank_name
Name of the bank.
optional, string, max chars=100
account_number
The account number to which funds will be transferred.
string, min chars=5, max chars=50
routing_number
The routing number of the bank.
string, min chars=9, max chars=50
swift_code
Swift code of the bank in which the account exists.
string, min chars=8, max chars=11
gateway
Name of the gateway this virtual bank account is stored in.
enumerated string
Possible values are
chargebeeChargebee test gateway.stripeStripe payment gateway.wepayWePay Gateway.braintreeBraintree payment gateway.
authorize_netAuthorize.net payment gateway.paypal_proPaypal Pro Account.pinPin payment gateway.ewayeWAY Account.eway_rapideWAY Rapid gateway.worldpayWorldPay payment gateway.balanced_paymentsBalanced payment gateway.beanstreamBeanstream Account.bluepayBluePay payment gateway.elavonElavon Virtual Merchant.first_data_globalFirst Data Global Gateway Virtual Terminal Account.hdfcHDFC Account.migsMasterCard Internet Gateway Service.nmiNMI gateway.ogoneOgone Account.paymillPAYMILL payment gateway.paypal_payflow_proPayPal Payflow Pro gateway.sage_paySage Pay gateway.tco2Checkout payment gateway.wirecardWireCard Account.amazon_paymentsThe amazon payments.paypal_express_checkoutThe paypal gateway.gocardlessGoCardless.adyenAdyen.orbitalChase Paymentech(Orbital) Gateway.moneris_usMoneris USA Gateway.monerisMoneris Gateway.bluesnapBlueSnap gateway.not_applicableIndicates that payment gateway is not applicable for this resource.
Show all values[+]
gateway_account_id
The gateway account in which this virtual bank account is stored.
string, max chars=50
reference_id
Identifier provided by the gateway for the virtual bank account source. In case of Stripe, the reference_id consists of a combination of Stripe Customer ID and Stripe Source ID separated by a forward slash (e.g. cus_63MnDn0t6kfDW7/src_6WjCF20vT9WN1G).
string, max chars=150
deleted
Indicates that this resource has been deleted.
boolean

Creates a virtual bank account using the identifier provided by the gateway.

Notes

Customer's email and virtual bank accounts will always be in sync. Email ID specified for virtual bank account creation will be considered over customers’ email ID.

Sample Request
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts/create_using_permanent_token \
     -u {site_api_key}: \
     -d customer_id="4gkYnd21ouvW" \
     -d reference_id="cus_C680lewsuvXgH9/src_C680EHUqh8tIbM"
copy
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts/create_using_permanent_token \
     -u {site_api_key}: \
     -d customer_id="4gkYnd21ouvW" \
     -d reference_id="cus_C680lewsuvXgH9/src_C680EHUqh8tIbM"

Sample Response [ JSON ]

{ "message": "Sorry,the http method post is not supported for this URL.", "type": "invalid_request", "api_error_code": "http_method_not_supported", "error_code": "http_method_not_supported", "error_msg": "Sorry,the http method post is not supported for this URL.", "http_status_code": 405 }

URL Format POST

https://{site}.chargebee.com/api/v2/virtual_bank_accounts/create_using_permanent_token
customer_id
Identifier of the customer.
required, string, max chars=50
reference_id
Identifier provided by the gateway for the virtual bank account source. In case of Stripe, the reference_id consists of a combination of Stripe Customer ID and Stripe Source ID separated by a forward slash (e.g. cus_63MnDn0t6kfDW7/src_6WjCF20vT9WN1G).
required, string, max chars=150
Resource object representing virtual_bank_account.
always returned
Resource object representing customer.
optional

Creates a virtual bank account for a customer. Email address is mandatory for virtual bank account creation. All notifications related to this virtual bank account will be sent to the email address you specify.

Notes

Customer's email and virtual bank accounts will always be in sync.

Sample Request
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts \
     -u {site_api_key}: \
     -d customer_id="4gkYnd21ouvW"
copy
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts \
     -u {site_api_key}: \
     -d customer_id="4gkYnd21ouvW"

Sample Response [ JSON ]

{ "message": "Sorry, we couldn't find that page", "type": "invalid_request", "api_error_code": "resource_not_found", "error_code": "page_not_found", "error_msg": "Sorry, we couldn't find that page", "http_status_code": 404 }

URL Format POST

https://{site}.chargebee.com/api/v2/virtual_bank_accounts
customer_id
Identifier of the customer.
required, string, max chars=50
email
Email address associated with the virtual bank account.
optional, string, max chars=70
Resource object representing virtual_bank_account.
always returned
Resource object representing customer.
optional
Retrieves the virtual bank account identified by the unique identifier.
Sample Request
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts/vba_5SK0b8vNQtyvEl98P \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts/vba_5SK0b8vNQtyvEl98P \
     -u {site_api_key}:

Sample Response [ JSON ]

{"virtual_bank_account": { "id": "vba_5SK0b8vNQtyvEl98P", "email": "jane@test.com", "bank_name": "TEST BANK", "account_number": "test_fe44816c8682", "routing_number": "110000000", "swift_code": "TSTEZ122", "gateway": "stripe", "gateway_account_id": "gw_5SK0b8vNQtyvEg38O", "deleted": false, "object": "virtual_bank_account", "customer_id": "4gkYnd21ouvW", "reference_id": "cus_CWoNXpK2VvGgzC/src_CWoNzGgWNsbreG" }}

URL Format GET

https://{site}.chargebee.com/api/v2/virtual_bank_accounts/{virtual_bank_account_id}
Resource object representing virtual_bank_account.
always returned
Lists all the virtual bank accounts.
Sample Request
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts \
     -G  \
     -u {site_api_key}: \
     --data-urlencode limit="5"
copy
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts \
     -G  \
     -u {site_api_key}: \
     --data-urlencode limit="5"

Sample Response [ JSON ]

{ "list": [ {"virtual_bank_account": { "id": "vba_5SK0b8q3QtyvGEXS", "email": "test@test.com", "bank_name": "TEST BANK", "account_number": "test_a4bef76c6c4d", "routing_number": "110000000", "swift_code": "TSTEZ122", "gateway": "stripe", "gateway_account_id": "gw_5SK0b8vNQtyvEg38O", "deleted": false, "object": "virtual_bank_account", "customer_id": "5SK0b8q3QtyvFXxP", "reference_id": "cus_CzAVKWbSo9dTwv/src_1CZCAHJv9j0DyntJFjpARVQG" }}, {..} ], "next_offset": "[\"1528093658000\",\"155000000003\"]" }

URL Format GET

https://{site}.chargebee.com/api/v2/virtual_bank_accounts
limit
Limits the number of resources to be returned.
optional, integer, default=10, min=1, max=100
offset
Allows you to fetch the next set of resources. The value used for this parameter must be the value returned for next_offset parameter in the previous API call.
optional, string, max chars=1000
Filter Params
For operator usages, see the Pagination and Filtering section.
customer_id[<operator>]
To filter based on VirtualBankAccount Id.
Supported operators : is, is_not, starts_with, in, not_in

Example customer_id[is] = "3bdjnDnsdQn"
optional, string filter
Resource object representing virtual_bank_account.
always returned
next_offset
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter “offset”.
optional, string, max chars=1000