> ## Documentation Index
> Fetch the complete documentation index at: https://vivawallet-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VivaWallet Node SDK: TypeScript Payments Integration

> Integrate VivaWallet payments, webhooks, ISV, and marketplace features into your Node.js application with this fully typed TypeScript SDK.

The VivaWallet Node SDK is a TypeScript library that lets you interact with the VivaWallet payment platform directly from your Node.js application. It covers everything from creating payment orders and managing transactions to handling webhooks, building ISV integrations, and running multi-seller marketplace platforms — all with full type safety.

<CardGroup cols={2}>
  <Card title="Installation" icon="box" href="/installation">
    Install the SDK and get your project set up in minutes
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Configure your API credentials for OAuth and Basic Auth
  </Card>

  <Card title="Payments Guide" icon="credit-card" href="/guides/payments">
    Create payment orders and redirect customers to SmartCheckout
  </Card>

  <Card title="Webhooks Guide" icon="webhook" href="/guides/webhooks">
    Subscribe to events and handle type-safe webhook payloads
  </Card>
</CardGroup>

## Choose Your Client

The SDK exports three client classes, each tailored to a specific integration model.

<CardGroup cols={3}>
  <Card title="Vivawallet" icon="building-columns" href="/clients/vivawallet">
    Standard merchant client for payments, transactions, wallets, and more
  </Card>

  <Card title="VivaISV" icon="network-wired" href="/clients/isv">
    ISV client for managing multiple merchant accounts and POS terminals
  </Card>

  <Card title="Marketplace" icon="shop" href="/clients/marketplace">
    Platform client for multi-seller marketplace payments and transfers
  </Card>
</CardGroup>

## Quick Start

<Steps>
  <Step title="Install the package">
    ```bash theme={null}
    npm install @nkhind/vivawallet-sdk
    ```
  </Step>

  <Step title="Create a client">
    ```typescript theme={null}
    import { Vivawallet } from '@nkhind/vivawallet-sdk';

    const vivawallet = new Vivawallet({
      clientId: 'your-smartcheckout-client-id',
      clientSecret: 'your-smartcheckout-client-secret',
      merchantId: 'your-merchant-uuid',
      apikey: 'your-api-key',
    });
    ```
  </Step>

  <Step title="Create a payment order">
    ```typescript theme={null}
    const result = await vivawallet.payments.createOrder({
      amount: 1000, // in cents — €10.00
      customerTrns: 'Order #1234',
      email: 'customer@example.com',
      fullName: 'John Doe',
      phone: '+30123456789',
      requestLang: 'en-GB',
    });

    if (!result.success) throw new Error('Failed to create order');
    const { orderCode } = result.data;
    ```
  </Step>

  <Step title="Redirect to SmartCheckout">
    ```typescript theme={null}
    import { getSmartCheckout } from '@nkhind/vivawallet-sdk';

    const checkoutUrl = getSmartCheckout({
      orderCode: String(orderCode),
    });

    // Redirect your user to checkoutUrl
    ```
  </Step>
</Steps>

## Explore the SDK

<CardGroup cols={2}>
  <Card title="Vivawallet Client" icon="circle-nodes" href="/clients/vivawallet">
    Full reference for the standard merchant client and all its modules
  </Card>

  <Card title="ISV Client" icon="sitemap" href="/clients/isv">
    Reference for the ISV client including connected accounts and POS
  </Card>

  <Card title="Marketplace Client" icon="store" href="/clients/marketplace">
    Reference for the Marketplace client with sellers and transfers
  </Card>

  <Card title="TypeScript Types" icon="brackets-curly" href="/reference/types">
    All exported TypeScript interfaces and type definitions
  </Card>
</CardGroup>
