Documentation Index Fetch the complete documentation index at: https://align.tolbel.com/llms.txt
Use this file to discover all available pages before exploring further.
Method Signature
align . virtualAccounts . get (
customerId : string ,
virtualAccountId : string
): Promise < VirtualAccount >
Parameters
The unique customer identifier
The unique virtual account identifier
Returns
Unique identifier for the virtual account
Wallet address where funds will be sent
Bank account details. Properties vary by account type. For USD accounts: {(account_number, routing_number)}
For EUR accounts: {(iban_number, bic)}
Type-Safe Instruction Access : Since deposit_instructions is a
discriminated union, we recommend using the SDK’s built-in type guards to
safely narrow the type: - isUSAccountDetails(instr): For USD (ACH/Wire)
accounts. - isIBANAccountDetails(instr): For EUR (SEPA) accounts. -
isInternationalWireAccountDetails(instr): For USD (SWIFT) accounts.
Examples
import { isUSAccountDetails , isIBANAccountDetails } from "@tolbel/align" ;
const account = await align . virtualAccounts . get ( customerId , "va_123" );
// Use type-safe helper functions for narrowing
if ( isUSAccountDetails ( account . deposit_instructions )) {
console . log ( `US Account: ${ account . deposit_instructions . us . account_number } ` );
} else if ( isIBANAccountDetails ( account . deposit_instructions )) {
console . log ( `IBAN: ${ account . deposit_instructions . iban . iban_number } ` );
}
Create Virtual Account Create a new virtual account
List Virtual Accounts List all accounts