Skip to main content
@nkhind/vivawallet-sdk is published to the public npm registry and works in any Node.js project that supports TypeScript. Install it once, import the client you need, and you are ready to make authenticated API calls — no additional HTTP client or token-management setup required.

Requirements

Before installing, make sure your environment meets the following minimum versions:

Install

NPM package

View the package on npm to check the latest published version, package metadata, and registry details.

Import the clients

The SDK exports each client class as a named export from the package root. Import only the clients you need:
getSmartCheckout is a synchronous helper that builds the VivaWallet hosted-checkout redirect URL from a payment order code. It accepts an orderCode (string), an optional dev flag for the demo environment, and optional color and paymentMethod query parameters:

Import TypeScript types

The SDK exports its public client classes, helper functions, and many public TypeScript types from the package root. Use those exports to type webhook payloads, method responses, and request bodies in your own code:
Import public SDK types from @nkhind/vivawallet-sdk first. Avoid relying on internal package subpaths unless a type is intentionally exposed there by a future SDK release.

Verifying your setup

Create a minimal script to confirm the package is installed and your TypeScript configuration can resolve the module. No real API credentials or network calls are needed for this check:
If this compiles and runs without errors, your installation is working correctly. Replace the placeholder strings with your real credentials (ideally from environment variables — see Authentication) when you are ready to make live or demo API calls.