VivaISV client’s payments module exposes three public methods: createOrder(), getOrder(), and cancelOrder().
Setup
InstantiateVivaISV with your ISV OAuth credentials. Add reseller credentials when you need Basic Auth endpoints such as order retrieval or cancellation.
Create a payment order
UsevivaIsv.payments.createOrder(merchantId, orderData) to create a payment order on behalf of a connected merchant. The first argument is the target merchant ID. The second argument is the ISV payment-order payload.
getSmartCheckout({ orderCode: String(orderCode) }) to build the redirect URL exactly as you would for a standard payment order.
Retrieve a payment order
getOrder() uses the ISV Basic Auth flow. Pass both the order code and targetMerchantId in the options object.
resellerId and resellerApiKey on the client.
Cancel a payment order
UsecancelOrder() to cancel an open payment order on a connected merchant account.
- Username —
{resellerId}:{targetMerchantId} - Password —
{resellerApiKey}
Ensure your ISV account has the necessary permissions granted by VivaWallet before performing operations on behalf of connected merchants. Authorization errors usually mean the merchant is not connected, permissions are missing, or the reseller credentials are not valid for that merchant.