Skip to main content
VivaISV is the client class for ISV integrations. It handles connected accounts, payment orders, transaction operations, source codes, POS operations, and webhooks across connected merchants.

Constructor

Import and instantiate the ISV client with your ISV credentials:
clientId
string
required
ISV OAuth 2.0 Client ID used to obtain Bearer tokens for ISV API calls.
clientSecret
string
required
ISV OAuth 2.0 Client Secret paired with clientId for token requests.
resellerId
string
Reseller ID used in Viva Basic Auth requests for ISV endpoints that require reseller-level authentication.
resellerApiKey
string
Reseller API Key used as the Basic Auth password. Required alongside resellerId for Basic Auth ISV endpoints.
sourceCode
string | null
Stored on the client for source-code helpers. Pass source codes in method options when an ISV endpoint requires one.
dev
boolean
default:"false"
When true, the client uses VivaWallet demo endpoints for API calls.
logs
boolean
default:"false"
Enables internal SDK error logging when true.

Sub-client Modules

Each module is available as a property on the VivaISV instance.
webhook and webhooks are aliases for the same IsvWebhook instance.

Methods

getCloudTerminalAccessToken()

Calls POST /connect/token with ISV credentials and grant_type=client_credentials, returning VivaWallet’s full token response. Use ISV credentials for ISV Cloud Terminal calls. The SDK does not cache this token.

getVivaWebhookCode()

Deprecated compatibility helper. Prefer vivaIsv.webhook.retrieveWebhookKey().

Basic Auth for ISV

Some ISV endpoints require Viva Basic Auth using a Reseller ID and API Key. For these calls, VivaWallet expects:
  • Username: resellerId:targetMerchantId
  • Password: resellerApiKey
Because targetMerchantId identifies which connected merchant account the operation targets, it is passed per method rather than at construction time:
Supply resellerId and resellerApiKey in the constructor to enable these Basic Auth calls.