Marketplace is the client class for multi-seller platform integrations. It covers platform payment orders, connected seller accounts, Marketplace transaction cancellation, fund transfers, webhooks, and payment source helpers.
Constructor
string
required
OAuth 2.0 Client ID for the platform account.
string
required
OAuth 2.0 Client Secret paired with
clientId for token requests.string
required
Merchant UUID of the platform account. Used as the username in Viva Basic Auth requests.
string
required
API key for the platform account. Used as the Basic Auth password.
string | null
Stored on the client for source-code helpers. Pass source codes in method options when a Marketplace endpoint requires one.
boolean
default:"false"
When
true, the client uses VivaWallet demo endpoints for API calls.boolean
default:"false"
Enables internal SDK error logging when
true.Sub-client Modules
Each module is available as a property on theMarketplace instance.
Common Methods
marketplace.transfers.sendFunds(data)
marketplace.transfers.createTransferReversal(transferId, options)
amount: null or omit the options object for a full reversal.
marketplace.transactions.cancelTransaction(transactionId, refundOptions)
getVivaWebhookCode()
marketplace.webhooks.retrieveWebhookKey().