Skip to main content
As an ISV, you can create and manage payment orders for merchants connected to your ISV account. The VivaISV client’s payments module exposes three public methods: createOrder(), getOrder(), and cancelOrder().

Setup

Instantiate VivaISV with your ISV OAuth credentials. Add reseller credentials when you need Basic Auth endpoints such as order retrieval or cancellation.

Create a payment order

Use vivaIsv.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.
Use 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.
This call requires resellerId and resellerApiKey on the client.

Cancel a payment order

Use cancelOrder() to cancel an open payment order on a connected merchant account.
For Basic Auth ISV endpoints, the SDK automatically builds the composite authentication header using:
  • 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.