Check to see if your bank’s product supports the Virtual Accounts API or the Internal Account API in our [Virtual Accounts Overview](🔗).

If your bank provides balances for these virtual accounts, use the [Internal Account API](🔗).

## Account Number Scheme

Depending on the bank, the virtual account numbers you use will follow a different provisioning scheme:

BankProduct NameScheme
BankProvVirtual LedgersDynamic
Cross River BankSubledgersDynamic
EvolvevAccountsRange
Goldman SachsVirtual AccountsRange
IncreaseAccount NumbersDynamic
JP Morgan ChaseVirtual Reference NumbersRange
Silicon Valley BankACH Sub-AccountsRange
Wells FargoPerfect ReceivablesRange

A `Dynamic` virtual account number scheme means the bank determines the virtual account number on request. You do not provide the virtual account number in your API call.

A `Range` virtual account number scheme means the bank provisions a range of account numbers to use.

  • You may either omit the account number or provide one when you initiate an API call to create a virtual account. If you omit the account number, Modern Treasury will automatically select one for you.

## Creating Virtual Accounts

You can create Virtual Account with or without an account number:



The response will contain the virtual account, including the virtual account number and routing number.



## Creating Virtual Accounts with a Counterparty

Our API supports linking a virtual account to a counterparty. This may be helpful if you are holding funds on behalf of someone, or if you want to link a set of transactions to a counterparty.



## Creating Virtual Accounts with a Ledger

To automatically track a balance for a Virtual Account, you can link it to two [Ledger Accounts](🔗): one debit normal account representing your internal account balance and one credit normal account representing the user's wallet balance. If a specific user sends money to their virtual account, both of these balances will automatically increase.

A virtual account can be linked on creation to ledger accounts using the `debit_ledger_account_id` and `credit_ledger_account_id` fields. Both fields must be passed together. When a payment moves money into a virtual account, we create an [Incoming Payment Details](🔗) as well as a [Ledger Transaction](🔗) referring to the Incoming Payment Detail via the `ledgerable_type` and `ledgerable_id` fields.

When money enters the virtual account, the ledger account referred to by `debit_ledger_account_id` will be debited and the ledger account referred to be `credit_ledger_account_id` will be credited.