2 credits per API call
Create a new virtual account for a customer.
- If the customer that you specified in the request body already exists, the newly created virtual account is added to this customer's list of accounts.
- If the customer that you specified in the request body does not exist yet, a new customer is created together with the virtual account, and the virtual account is added to this customer.
You can create a virtual account for any supported cryptocurrency, fiat currency, Tatum virtual currency, or fungible tokens created within Tatum. Once the currency/asset is set for a virtual account, it cannot be changed.
Virtual account balance
A virtual account has its own balance. The balance can be logically presented by the account balance and available balance:
- The account balance (
accountBalance
) represents all assets on the account, both available and blocked. - The available balance (
availableBalance
) represents the account balance minus the blocked assets. Use the available balance to determine how much a customer can send or withdraw from their virtual account.
Cryptocurrency virtual accounts
When you create a virtual account based on a cryptocurrency (for example, BTC or ETH), you have to provide the extended public key (xpub
) of the blockchain wallet that will be connected to this account.
NOTE: Adding xpub
to the virtual account does not connect any specific blockchain address to this account. xpub
is a generator of addresses, not an address itself.
Not all blockchains provide xpub
for wallets, or Tatum may not support wallets on some blockchains. In such cases, use the wallet address or the account address instead.
- ALGO: No
xpub
provided; useaddress
from the generated wallet instead. - BCH: Obtain
xpub
from the generated wallet. - BNB: No
xpub
provided; useaddress
from the generated wallet instead. - BSC: Obtain
xpub
from the generated wallet instead. - BTC: Obtain
xpub
from the generated wallet instead. - CELO: Obtain
xpub
from the generated wallet. - DOGE: Obtain
xpub
from the generated wallet. - EGLD: No
xpub
provided; useaddress
from the generated blockchain address instead.
Blockchain addresses on Elrond are generated based on the mnemonic of an Elrond wallet. If you do not have an Elrond wallet, create one. - ETH: Obtain
xpub
from the generated wallet. - FLOW: Obtain
xpub
from the generated wallet. - KCS: Obtain
xpub
from the generated wallet. - KLAY: Obtain
xpub
from the generated wallet. - LTC: Obtain
xpub
from the generated wallet. - MATIC: Obtain
xpub
from the generated wallet. - SOL: No
xpub
provided; useaddress
from the generated wallet instead. - TRON: Obtain
xpub
from the generated wallet. - XDC: Obtain
xpub
from the generated wallet. - XLM: No
xpub
provided; useaddress
from the generated account instead. - XRP: No
xpub
provided; useaddress
from the generated account instead.
Connect a virtual account to the blockchain
- If the virtual account was created with the wallet's
xpub
, generate a new blockchain address for this account. - If the virtual account was created with the wallet's or account's address instead of the wallet's
xpub
, assign an existing blockchain address to this account.
You can connect multiple blockchain addresses to one virtual account.
Digital assets:
- USDC_MATIC refers to contract
0x2791bca1f2de4661ed88a30c99a7a9449aa84174
on Polygon mainnet. - USDC_MATIC_NATIVE refers to contract
0x3c499c542cef5e3811e1192ce70d8cc03d5c3359
on Polygon mainnet.