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
OAuth 2.0 Client ID for the platform account.
OAuth 2.0 Client Secret paired with
clientId for token requests.Merchant UUID of the platform account. Used as the username in Viva Basic Auth requests.
API key for the platform account. Used as the Basic Auth password.
Stored on the client for source-code helpers. Pass source codes in method options when a Marketplace 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 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().