Vivawallet is the primary client class for standard merchant integrations. It exposes typed sub-client modules for payments, transactions, webhooks, fees, wallets, bank transfers, data services, POS helpers, resellers, RF code payments, obligations, source codes, and legacy bank accounts.
Constructor
OAuth 2.0 Client ID used to request Bearer tokens.
OAuth 2.0 Client Secret paired with
clientId for token requests.Merchant UUID used as the username in Viva Basic Auth requests.
API key used as the password in Viva Basic Auth requests.
Stored on the client for source-code helpers. Pass source codes in method options when a payment or transaction endpoint requires one.
When
true, the client uses VivaWallet demo endpoints for API calls.Enables internal SDK error logging when
true.Sub-client Modules
Each module is available as a property on theVivawallet instance and handles one domain of the VivaWallet API.
Methods
getCloudTerminalAccessToken()
POST /connect/token with grant_type=client_credentials and returns VivaWallet’s full token response. The SDK does not cache this token; callers should reuse it until expires_in elapses.
getVivaWebhookCode()
webhooks.retrieveWebhookKey().
getSmartCheckout(options)
A standalone named export, not a method on the class. It builds the full SmartCheckout redirect URL for a given order code.
The order code returned by
payments.createOrder(), converted to a string.Optional color value appended to the SmartCheckout URL.
Optional VivaWallet payment method identifier to pre-select on SmartCheckout.
When
true, constructs a URL pointing to the VivaWallet demo checkout environment.string — the fully constructed SmartCheckout redirect URL.