Skip to main content
The SDK is written in TypeScript and exports the public client classes, helper functions, and many request/response types from the package root. Import documented public types alongside your client classes in a single statement:

MethodReturn<TData, TCode>

MethodReturn is the discriminated union type returned by every async method in the SDK. It has two shapes — a success variant and a failure variant — so TypeScript can narrow result.data to its correct type inside a success branch.
Usage example:
The TCode type parameter is a string literal (e.g., 'webhookerror') that represents the set of known error codes for that specific method. See the Errors reference for details.

Webhook Types

The SDK exports both the original webhook payload aliases and newer tolerant webhook helper types. Use the original aliases for simple typed handlers, and use the tolerant types with the helper functions documented in Webhook Helpers. Example — typing an Express webhook handler:

Core Types

The types below are exported from @nkhind/vivawallet-sdk and can be imported with import type { ... }. Internal-only SDK types are intentionally not listed here.

Payments

Fees

Transactions

Bank Transfers

Wallets

Standard POS / Cloud Terminal

Webhooks

Data Services

Obligations

Resellers

RF Code Payments

Legacy Bank Accounts

Marketplace