API Version
Product Catalog
Library

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 ]

{ "account_number": "test_544b835aab71", "bank_name": "TEST BANK", "created_at": 1517501395, "customer_id": "__test__KyVnHhSBWSv7Y5F", "deleted": false, "email": "apple@apple.com", "gateway": "stripe", "gateway_account_id": "gw___test__KyVnGlSBWSv3GHt", "id": "vba___test__KyVnHhSBWSvqH5J", "object": "virtual_bank_account", "reference_id": "cus_I57FgHUl6NNqeT/src_1HUx14Jv9j0DyntJqopyd9ax", "resource_version": 1517501395000, "routing_number": "110000000", "scheme": "ach_credit", "swift_code": "TSTEZ122", "updated_at": 1517501395 }

API Index URL GET

https://{site}.chargebee.com/api/v2/virtual_bank_accounts

Model Class

id
string, max chars=40
Identifier of the virtual bank account
customer_id
string, max chars=50
Identifier of the customer.
email
string, max chars=70
Email address associated with the virtual bank account
scheme
optional, enumerated string, default=ach_credit
type of the credit transfer
Possible values are
ach_creditACH Credit Transfersepa_creditSEPA Credit Transferus_automated_bank_transfergb_automated_bank_transfer
Show all values[+]
bank_name
optional, string, max chars=100
Name of the bank
account_number
string, min chars=5, max chars=50
The account number to which funds will be transferred.
routing_number
optional, string, min chars=9, max chars=50
The routing number of the bank
swift_code
string, min chars=8, max chars=11
Swift code of the bank in which the account exists.
gateway
enumerated string
Name of the gateway this virtual bank account is stored in.
Possible values are
chargebeeChargebee test gateway.chargebee_paymentsChargebee Payments gatewaystripeStripe is a payment gateway.wepayWePay is a payment gateway.
Show all values[+]
gateway_account_id
string, max chars=50
The gateway account in which this virtual bank account is stored.
resource_version
optional, long
Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
updated_at
optional, timestamp(UTC) in seconds
Timestamp indicating when this virtual bank account resource was last updated.
created_at
timestamp(UTC) in seconds
Timestamp indicating when this virtual bank account resource is created.
reference_id
string, max chars=150
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).
deleted
boolean
Indicates that this resource has been deleted.
id id
string, max chars=40
Identifier of the virtual bank account
customer_id customer_id
string, max chars=50
Identifier of the customer.
email email
string, max chars=70
Email address associated with the virtual bank account
scheme scheme
optional, enumerated string, default=ach_credit
type of the credit transfer
bank_name bank_name
optional, string, max chars=100
Name of the bank
account_number account_number
string, min chars=5, max chars=50
The account number to which funds will be transferred.
routing_number routing_number
optional, string, min chars=9, max chars=50
The routing number of the bank
swift_code swift_code
string, min chars=8, max chars=11
Swift code of the bank in which the account exists.
gateway gateway
enumerated string
Name of the gateway this virtual bank account is stored in.
gateway_account_id gateway_account_id
string, max chars=50
The gateway account in which this virtual bank account is stored.
resource_version resource_version
optional, long
Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
updated_at updated_at
optional, timestamp(UTC) in seconds
Timestamp indicating when this virtual bank account resource was last updated.
created_at created_at
timestamp(UTC) in seconds
Timestamp indicating when this virtual bank account resource is created.
reference_id reference_id
string, max chars=150
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).
deleted deleted
boolean
Indicates that this resource has been deleted.

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="__test__KyVnHhSBWSv7Y5F" \
     -d reference_id="cus_I57FgHUl6NNqeT/src_1HUx14Jv9j0DyntJqopyd9ax"
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "customer": {
        "allow_direct_debit": false,
        "auto_collection": "on",
        "billing_address": {
            "city": "Walnut",
            "country": "US",
            "first_name": "Mark",
            "last_name": "Henry",
            "line1": "PO Box 9999",
            "object": "billing_address",
            "state": "California",
            "state_code": "CA",
            "validation_status": "not_validated",
            "zip": "91789"
        },
        "card_status": "no_card",
        "created_at": 1517501394,
        "deleted": false,
        "email": "apple@apple.com",
        "excess_payments": 0,
        "first_name": "Mark",
        "id": "__test__KyVnHhSBWSv7Y5F",
        "last_name": "Henry",
        "net_term_days": 0,
        "object": "customer",
        "pii_cleared": "active",
        "preferred_currency_code": "USD",
        "promotional_credits": 0,
        "refundable_credits": 0,
        "resource_version": 1517501395000,
        "taxability": "taxable",
        "unbilled_charges": 0,
        "updated_at": 1517501395
    },
    "virtual_bank_account": {
        "account_number": "test_544b835aab71",
        "bank_name": "TEST BANK",
        "created_at": 1517501395,
        "customer_id": "__test__KyVnHhSBWSv7Y5F",
        "deleted": false,
        "email": "apple@apple.com",
        "gateway": "stripe",
        "gateway_account_id": "gw___test__KyVnGlSBWSv3GHt",
        "id": "vba___test__KyVnHhSBWSvqH5J",
        "object": "virtual_bank_account",
        "reference_id": "cus_I57FgHUl6NNqeT/src_1HUx14Jv9j0DyntJqopyd9ax",
        "resource_version": 1517501395000,
        "routing_number": "110000000",
        "scheme": "ach_credit",
        "swift_code": "TSTEZ122",
        "updated_at": 1517501395
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/virtual_bank_accounts/create_using_permanent_token

Method

customer_id[]
required, string, max chars=50
Identifier of the customer.
reference_id[]
required, string, max chars=150
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).
scheme[]
optional, enumerated string, default=ach_credit
type of the credit transfer.
Possible values are
ach_creditACH Credit Transfersepa_creditSEPA Credit Transferus_automated_bank_transfergb_automated_bank_transfer
Show all values[+]
virtual_bank_account virtual_bank_account
always returned
Resource object representing virtual_bank_account
customer customer
optional
Resource object representing customer

Sample admin console URL

https://{site}.chargebee.com/admin-console/virtual_bank_accounts/123x

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="__test__KyVnHhSBWSvsr5M" \
     -d email="Duncan@ac.com"
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "customer": {
        "allow_direct_debit": false,
        "auto_collection": "on",
        "billing_address": {
            "city": "Walnut",
            "country": "US",
            "first_name": "Duncan",
            "last_name": "Walpole",
            "line1": "PO Box 9999",
            "object": "billing_address",
            "state": "California",
            "state_code": "CA",
            "validation_status": "not_validated",
            "zip": "91789"
        },
        "card_status": "no_card",
        "created_at": 1517501395,
        "deleted": false,
        "email": "Duncan@ac.com",
        "excess_payments": 0,
        "first_name": "Duncan",
        "id": "__test__KyVnHhSBWSvsr5M",
        "last_name": "walpole",
        "net_term_days": 0,
        "object": "customer",
        "pii_cleared": "active",
        "preferred_currency_code": "USD",
        "promotional_credits": 0,
        "refundable_credits": 0,
        "resource_version": 1517501395000,
        "taxability": "taxable",
        "unbilled_charges": 0,
        "updated_at": 1517501395
    },
    "virtual_bank_account": {
        "account_number": "test_5a576cb69dc2",
        "bank_name": "TEST BANK",
        "created_at": 1517501396,
        "customer_id": "__test__KyVnHhSBWSvsr5M",
        "deleted": false,
        "email": "Duncan@ac.com",
        "gateway": "stripe",
        "gateway_account_id": "gw___test__KyVnGlSBWSv3GHt",
        "id": "vba___test__KyVnHhSBWSw7J5O",
        "object": "virtual_bank_account",
        "reference_id": "cus_I57FLcFhampr4H/src_1HUx16Jv9j0DyntJh6X59egJ",
        "resource_version": 1517501396000,
        "routing_number": "110000000",
        "scheme": "ach_credit",
        "swift_code": "TSTEZ122",
        "updated_at": 1517501396
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/virtual_bank_accounts

Method

customer_id[]
required, string, max chars=50
Identifier of the customer.
email[]
optional, string, max chars=70
Email address associated with the virtual bank account.
scheme[]
optional, enumerated string, default=ach_credit
type of the credit transfer.
Possible values are
ach_creditACH Credit Transfersepa_creditSEPA Credit Transferus_automated_bank_transfergb_automated_bank_transfer
Show all values[+]
virtual_bank_account virtual_bank_account
always returned
Resource object representing virtual_bank_account
customer customer
optional
Resource object representing customer

Sample admin console URL

https://{site}.chargebee.com/admin-console/virtual_bank_accounts/123x

Retrieves the virtual bank account identified by the unique identifier.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts/vba___test__KyVnHhSBWSxD05c \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "virtual_bank_account": {
        "account_number": "test_4fd6bbafe466",
        "bank_name": "TEST BANK",
        "created_at": 1517501401,
        "customer_id": "__test__KyVnHhSBWSwxc5a",
        "deleted": false,
        "email": "Duncan@ac.com",
        "gateway": "stripe",
        "gateway_account_id": "gw___test__KyVnGlSBWSv3GHt",
        "id": "vba___test__KyVnHhSBWSxD05c",
        "object": "virtual_bank_account",
        "reference_id": "cus_I57F4k8pLWzIxn/src_1HUx1AJv9j0DyntJblhHJSXQ",
        "resource_version": 1517501401000,
        "routing_number": "110000000",
        "scheme": "ach_credit",
        "swift_code": "TSTEZ122",
        "updated_at": 1517501401
    }
}

URL Format GET

https://{site}.chargebee.com/api/v2/virtual_bank_accounts/{virtual-bank-account-id}

Method

virtual_bank_account virtual_bank_account
always returned
Resource object representing virtual_bank_account

Sample admin console URL

https://{site}.chargebee.com/admin-console/virtual_bank_accounts/123x

Lists all the virtual bank accounts.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts \
     -G  \
     -u {site_api_key}:\
     --data-urlencode limit=5
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "list": [
        {
            "virtual_bank_account": {
                "account_number": "test_5a576cb69dc2",
                "bank_name": "TEST BANK",
                "created_at": 1517501396,
                "customer_id": "__test__KyVnHhSBWSvsr5M",
                "deleted": false,
                "email": "Duncan@ac.com",
                "gateway": "stripe",
                "gateway_account_id": "gw___test__KyVnGlSBWSv3GHt",
                "id": "vba___test__KyVnHhSBWSw7J5O",
                "object": "virtual_bank_account",
                "reference_id": "cus_I57FLcFhampr4H/src_1HUx16Jv9j0DyntJh6X59egJ",
                "resource_version": 1517501396000,
                "routing_number": "110000000",
                "scheme": "ach_credit",
                "swift_code": "TSTEZ122",
                "updated_at": 1517501396
            }
        },
        {..}
    ]
}

URL Format GET

https://{site}.chargebee.com/api/v2/virtual_bank_accounts

Method

limit[]
optional, integer, default=10, min=1, max=100
The number of resources to be returned.
offset[]
optional, string, max chars=1000
Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.
Filter Params
For operator usages, see the Pagination and Filtering section.
customer_id[<operator>]
optional, string filter
Identifier of the customer. Possible values are :
Supported operators : is, is_not, starts_with, in, not_in

Example customer_id[is] = "3bdjnDnsdQn"
customer_id[is][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
customer_id[is_not][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
customer_id[starts_with][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
customer_id[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
customer_id[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
updated_at[<operator>]
optional, timestamp(UTC) in seconds filter
Timestamp indicating when this virtual bank account resource was last updated. Possible values are :
Supported operators : after, before, on, between

Example updated_at[after] = "1435054328"
updated_at[after][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
updated_at[before][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
updated_at[on][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
updated_at[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
created_at[<operator>]
optional, timestamp(UTC) in seconds filter
Timestamp indicating when this virtual bank account resource is created. Possible values are :
Supported operators : after, before, on, between

Example created_at[after] = "1435054328"
created_at[after][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
created_at[before][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
created_at[on][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
created_at[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
virtual_bank_account virtual_bank_account
always returned
Resource object representing virtual_bank_account
next_offset next_offset
optional, string, max chars=1000
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`.

Sample admin console URL

https://{site}.chargebee.com/admin-console/virtual_bank_accounts/123x

Deletes a virtual bank account. If there is no virtual bank account present in the gateway for the customer, this API will return successfully without throwing an error.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts/vba___test__KyVnHhSBWSwNX5S/delete \
     -X POST  \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "virtual_bank_account": {
        "account_number": "test_ad9223150767",
        "bank_name": "TEST BANK",
        "created_at": 1517501397,
        "customer_id": "__test__KyVnHhSBWSw9h5Q",
        "deleted": true,
        "email": "Duncan@ac.com",
        "gateway": "stripe",
        "gateway_account_id": "gw___test__KyVnGlSBWSv3GHt",
        "id": "vba___test__KyVnHhSBWSwNX5S",
        "object": "virtual_bank_account",
        "reference_id": "cus_I57FoRRoh1LtvC/src_1HUx17Jv9j0DyntJwz97BE6T",
        "resource_version": 1517501397000,
        "routing_number": "110000000",
        "scheme": "ach_credit",
        "swift_code": "TSTEZ122",
        "updated_at": 1517501397
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/virtual_bank_accounts/{virtual-bank-account-id}/delete

Method

virtual_bank_account virtual_bank_account
always returned
Resource object representing virtual_bank_account

Sample admin console URL

https://{site}.chargebee.com/admin-console/virtual_bank_accounts/123x

Deletes virtual bank accounts from Chargebee. Payment method in the payment gateway, and Auto Collection settings in Chargebee are not affected.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/virtual_bank_accounts/vba___test__KyVnHhSBWSwuP5X/delete_local \
     -X POST  \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "virtual_bank_account": {
        "account_number": "test_37dd91f91556",
        "bank_name": "TEST BANK",
        "created_at": 1517501399,
        "customer_id": "__test__KyVnHhSBWSweW5V",
        "deleted": true,
        "email": "Duncan@ac.com",
        "gateway": "stripe",
        "gateway_account_id": "gw___test__KyVnGlSBWSv3GHt",
        "id": "vba___test__KyVnHhSBWSwuP5X",
        "object": "virtual_bank_account",
        "reference_id": "cus_I57Fwosbo6LGbY/src_1HUx19Jv9j0DyntJeMYS2q0F",
        "resource_version": 1517501399000,
        "routing_number": "110000000",
        "scheme": "ach_credit",
        "swift_code": "TSTEZ122",
        "updated_at": 1517501399
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/virtual_bank_accounts/{virtual-bank-account-id}/delete_local

Method

virtual_bank_account virtual_bank_account
always returned
Resource object representing virtual_bank_account

Sample admin console URL

https://{site}.chargebee.com/admin-console/virtual_bank_accounts/123x