Use vivawallet.wallets for wallet balance visibility and transfers between Viva wallets. The module exposes three methods: retrieveMerchantWallets(), retrieveWallet(), and balanceTransfer(walletId, targetWalletId, options).
For transaction-level reporting, MT940 data, and sale transaction exports, use vivawallet.dataServices. The wallets module focuses on wallet balances and inter-wallet fund movements.
Retrieve merchant wallets
Call retrieveMerchantWallets() to retrieve wallets set up under the merchant profile through Viva’s current OAuth-backed endpoint.
The response exposes lower-camel-case wallet fields such as walletId, iban, amount, available, currencyCode, and friendlyName.
Retrieve the legacy wallet
Call retrieveWallet() for the older Basic Auth wallet endpoint. This is useful when maintaining an existing integration that still depends on the legacy Viva response shape.
Legacy responses use Viva’s older PascalCase fields such as WalletId, Iban, Available, CurrencyCode, and FriendlyName.
Transfer balance between wallets
Move funds from one wallet to another with balanceTransfer(walletId, targetWalletId, options). Amounts are expressed in the currency’s smallest unit.
walletId is the source wallet and targetWalletId is the destination wallet. Both can be strings or numbers, but they must refer to wallets available to the merchant credentials used by the client.
Full example
The following pattern retrieves available wallets, picks two wallet IDs, and transfers funds between them.