Skip to main content

Create a virtual account

curl -X POST https://api.ledger.so/v1/virtual-accounts \
  -H "Authorization: Bearer $LEDGER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-va-1" \
  -d '{
    "customerId": "cus_...",
    "sourceCurrency": "usd"
  }'
Response:
{
  "ok": true,
  "data": {
    "id": "va_...",
    "customerId": "cus_...",
    "sourceCurrency": "usd",
    "status": "active",
    "depositInstructions": {
      "bank_name": "...",
      "account_number": "...",
      "routing_number": "..."
    },
    "createdAt": 1710000000000,
    "updatedAt": 1710000000000
  }
}
Ledger returns deposit instructions (routing number, account number, IBAN, CLABE, etc.) that your customer can share with senders.

Check balance

curl https://api.ledger.so/v1/virtual-accounts/va_.../balance \
  -H "Authorization: Bearer $LEDGER_API_KEY"
{
  "ok": true,
  "data": {
    "virtualAccountId": "va_...",
    "balance": "1500.00",
    "currency": "eur",
    "exchangeRate": "0.872"
  }
}
The balance is shown in the virtual account’s source currency. For USD accounts, exchangeRate is null.

How it works

  1. Create a virtual account for a customer
  2. Ledger returns bank deposit instructions
  3. When fiat arrives, Ledger converts it to stablecoins
  4. The linked wallet balance is credited automatically
  5. A transaction is created

Supported currencies

Virtual accounts accept deposits in USD, EUR, GBP, MXN, and more. Funds are automatically converted to stablecoins and settled to the customer’s wallet.