Skip to main content
The bankTransfers module wraps Viva’s current bank transfer endpoints. Use it to link an IBAN, retrieve linked bank accounts, check available transfer options, create a fee command, and execute an outgoing transfer from a Viva wallet.
The current bank transfer methods use OAuth credentials internally. The legacyBankAccounts module is still available for older Basic Auth endpoints.
Call linkBankAccount(options) with the IBAN and optional labels.
Keep the returned bankAccountId; the transfer option, fee, and execution methods all receive it as their first argument.

Retrieve linked bank accounts

Use retrieveBankAccounts(query?) to list linked accounts. The query supports skip, maxResults, iban, isArchived, and bankAccountId.
To retrieve one account directly, call retrieveBankAccountById(bankAccountId).

Update a bank account

Call updateBankAccount(bankAccountId, options) to archive or rename a linked account.

Retrieve transfer options

Use retrieveBankTransferOptions(bankAccountId, query) before creating a transfer fee command. The query currently requires the transfer amount.
instructionTypes uses Viva’s numeric values: 1 for shared charges and 2 when you pay all transfer charges.

Create a bank transfer fee command

Use createBankTransferFeeCommand(bankAccountId, options) to calculate and lock the transfer fee for a given wallet, amount, instruction type, and instant-transfer preference.
Pass bankCommandId to executeBankTransfer() when you want to execute the transfer with that quoted fee.

Execute a bank transfer

Call executeBankTransfer(bankAccountId, options) with the source wallet and transfer amount.
For Viva IBAN destinations the response may include walletTransactionId; for non-Viva IBAN transfers it may include commandId.

Legacy bank accounts

Older integrations can use legacyBankAccounts, which targets Viva’s Basic Auth bank account endpoints. Use it only when maintaining a legacy flow.
The legacy method names and payload casing follow the older Viva API, so keep them separate from the current bankTransfers module when migrating code.