Back to Home

Documentation

Quick Start

Installation

npm install @vegaci_shared/vsplit-payment-gateway

Basic Usage

import { VSplitPaymentGateway } from '@vegaci_shared/vsplit-payment-gateway';

// Initialize the gateway
const gateway = new VSplitPaymentGateway({
  stripePublishableKey: 'pk_test_...',
  environment: 'sandbox',
  currency: 'usd'
});

// Configure split payment
const splitConfig = {
  splits: [
    { 
      amount: 8500, // $85.00
      label: 'Merchant Revenue',
      recipient: 'merchant_account_id' 
    },
    { 
      amount: 1500, // $15.00
      label: 'Platform Fee',
      recipient: 'platform_account_id'
    }
  ]
};

// Process the payment
await gateway.processSplitPayment(splitConfig);

Key Features

Multi-Recipient Splits

Split payments across unlimited recipients with custom amounts or percentages.

TypeScript First

Full TypeScript support with comprehensive type definitions and IntelliSense.

React Integration

Pre-built React components and hooks for seamless integration.

Stripe Powered

Built on Stripe's secure infrastructure with PCI compliance included.

Live Demo Examples

Resources