Marketplace client’s payments module creates payment orders under your platform account. Once the buyer completes payment, your platform can distribute funds to connected accounts with marketplace.transfers.sendFunds().
Initialize the Marketplace client
Instantiate theMarketplace client with your platform’s OAuth credentials and merchant Basic Auth details. All modules — source, payments, sellers, transfers, transactions, and webhooks — are available as properties on this single instance.
Create a Marketplace payment order
Callmarketplace.payments.createOrder(orderData) with the buyer details and order amount. On success, the response includes an orderCode you use to redirect the buyer to SmartCheckout.
transfer object supported by MPOrdersOptions.
Cancel an unpaid Marketplace order
marketplace.payments.cancelOrder() is available through the shared payment-order cancellation helper. It takes the order code directly.
Marketplace webhooks
Subscribe to VivaWallet events usingmarketplace.webhooks so your platform is notified when payments complete or fail. Use these notifications to trigger downstream actions such as fund transfers to connected accounts.
After a payment is completed, use
marketplace.transfers.sendFunds() to distribute funds to the appropriate connected account. See the Transfers guide for details.