Documentation Index
Fetch the complete documentation index at: https://docs.ledger.so/llms.txt
Use this file to discover all available pages before exploring further.
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_...",
"walletId": "wal_...",
"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. The walletId is the wallet where deposited fiat is converted to stablecoins — use it in POST /v1/transfers to move funds out.
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
- Create a virtual account for a customer
- Ledger returns bank deposit instructions and a
walletId
- When fiat arrives, Ledger converts it to stablecoins in the wallet
- The wallet balance is credited automatically
- Transfer funds out using
POST /v1/transfers with the walletId
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.