Installation

Install the ZynPay SDK in your project and set up your development environment.

Choose Your SDK

Install TypeScript SDK

Install the ZynPay SDK and ethers.js in your project:

npm install @zyntrialabs/zynpay-sdk ethers
Requirements
  • Node.js 18 or later
  • React 18+ (for React applications)
  • TypeScript 4.9+ (recommended)
  • ethers.js v6.x
Import in Your Code
import { ZynPayClient, Environment } from '@zyntrialabs/zynpay-sdk';
import { BrowserProvider } from 'ethers';

Development Setup

1. Install MetaMask

Install MetaMask browser extension for testing:

  • Download MetaMask for Chrome, Firefox, or Brave
  • Create a new wallet or import an existing one
  • Switch to Base Sepolia testnet
2. Get Testnet Tokens

You'll need both ETH (for gas) and USDC (for payments) on testnet:

Base Sepolia (Recommended)

Arc Testnet

3. Configure Environment

Set up your environment variables:

# .env.local (for Next.js/React)
NEXT_PUBLIC_MERCHANT_WALLET=0xYourMerchantWalletAddress
NEXT_PUBLIC_ENVIRONMENT=testnet

# .env (for Python)
MERCHANT_WALLET=0xYourMerchantWalletAddress
ENVIRONMENT=testnet

Verify Installation

Create a simple test file to verify the SDK is working:

// test.ts
import { ZynPayClient, Environment } from '@zyntrialabs/zynpay-sdk';

const client = new ZynPayClient({
  merchantWallet: '0xYourMerchantWalletAddress',
  environment: Environment.TESTNET,
  defaultChain: 'base',
});

console.log('✅ ZynPay SDK installed successfully!');
console.log('Supported chains:', client.getSupportedChains());