Skip to main content
The 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 the Marketplace 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

Call marketplace.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.
The Marketplace order payload extends the standard payment order payload. When you already know the connected account split at order creation time, you can include the optional 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 using marketplace.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.
You can retrieve your webhook verification key at any time:
After a payment is completed, use marketplace.transfers.sendFunds() to distribute funds to the appropriate connected account. See the Transfers guide for details.