Skip to content

A unified payment gateway for x402 protocol integration, providing developers with a streamlined API for cryptocurrency payment processing over x402.

Notifications You must be signed in to change notification settings

Vantage402/vantage402

Repository files navigation

Vantage402

A unified payment gateway for x402 protocol integration, providing developers with a streamlined API for cryptocurrency payment processing over HTTP.

Overview

x402 is an open payment protocol that leverages the HTTP 402 Payment Required status code to facilitate cryptocurrency payments through standard HTTP requests. Vantage402 serves as a comprehensive integration layer, abstracting the underlying blockchain complexity while maintaining the protocol's core principles.

Key Features

Vantage402 is designed to minimize integration friction while maximizing reliability and developer experience:

  • Rapid Integration - Production-ready implementation in under 10 minutes with minimal configuration
  • Unified API Surface - Single RESTful endpoint handles payment initialization, verification, and settlement
  • Managed Infrastructure - Automated wallet management, key rotation, and transaction monitoring
  • Real-time WebSocket Events - Instant payment status updates via WebSocket connections
  • Framework Agnostic - Language-independent REST API with official SDKs for JavaScript, Python, and Rust
  • High Availability - 99.9% uptime SLA with geographic redundancy and automatic failover

Documentation

Comprehensive technical documentation is maintained in the docs/ directory using GitBook format. This includes detailed API specifications, integration guides, and implementation examples.

Primary Documentation: docs/README.md

Documentation Structure

  • Getting Started - Initial setup, authentication, and first API call
  • API Reference - Complete endpoint documentation with request/response schemas
  • Authentication - API key management and security best practices
  • Code Examples - Implementation samples in JavaScript, Python, and Rust
  • FAQ & Support - Common integration patterns and troubleshooting

Development

Technology Stack

This project implements a modern web architecture optimized for performance and developer experience:

Layer Technology Purpose
Framework Next.js 15 (App Router) Server-side rendering, routing, and API routes
Language TypeScript 5.7+ Type safety and enhanced IDE support
Styling Tailwind CSS 4.x Utility-first CSS with JIT compilation
UI Components shadcn/ui Accessible, customizable React components
Smart Contracts Anchor (Solana) On-chain payment logic and verification
Testing Jest + React Testing Library Unit and integration testing

Local Development Setup

# Install dependencies (using npm)
npm install

# Run development server (http://localhost:3000)
npm run dev

# Run test suite
npm test

# Build production bundle
npm run build

# Start production server
npm start

Environment Configuration

Create a .env.local file in the project root:

# Application Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000

# API Keys (obtain from dashboard)
NEXT_PUBLIC_API_KEY=your_api_key_here

# Optional: Solana RPC endpoint
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com

Architecture

Project Structure

vantage402/
├── app/                      # Next.js App Router
│   ├── layout.tsx           # Root layout with providers
│   ├── page.tsx             # Landing page
│   ├── status/              # System status monitoring
│   └── globals.css          # Global styles and Tailwind directives
├── components/              # React components
│   ├── ui/                  # Base UI primitives (shadcn/ui)
│   ├── hero-section.tsx     # Landing page hero
│   ├── features-section.tsx # Feature grid
│   ├── stats-section.tsx    # Metrics display
│   ├── code-showcase.tsx    # Interactive code examples
│   ├── header.tsx           # Site navigation
│   └── footer.tsx           # Site footer
├── contracts/               # Solana smart contracts (Anchor)
│   ├── payment_escrow.rs    # Escrow account management
│   ├── payment_multisig.rs  # Multi-signature approvals
│   ├── payment_streaming.rs # Recurring payments
│   └── Anchor.toml          # Anchor workspace config
├── docs/                    # Technical documentation (GitBook)
│   ├── api-reference/       # REST API specifications
│   ├── examples/            # Integration code samples
│   └── resources/           # FAQs and support guides
├── hooks/                   # Custom React hooks
├── lib/                     # Utility functions and helpers
└── __tests__/              # Test suites

Smart Contract Architecture

The payment system is implemented using Anchor framework on Solana, providing:

  • Escrow Management - Secure fund holding with multi-party release conditions
  • Multi-signature Authorization - Configurable approval thresholds for high-value transactions
  • Payment Streaming - Time-locked recurring payments with cancellation support
  • Dispute Resolution - On-chain arbitration mechanism for payment conflicts
  • Settlement Layer - Atomic batch settlement for transaction finality

Publishing Documentation

The docs/ directory is configured for GitBook integration:

GitBook Setup

  1. Repository Connection

    • Navigate to GitBook
    • Create a new space for Vantage402
    • Connect to this GitHub repository
    • Configure root path to /docs
  2. Configuration Files

    • .gitbook.yaml - GitBook integration settings
    • SUMMARY.md - Documentation navigation structure
    • Topic-organized Markdown files
  3. Continuous Deployment

    • GitBook automatically syncs on repository push
    • Changes to docs/ trigger documentation updates

Local Documentation Preview

View documentation locally using any Markdown viewer:

cd docs
# Use GitBook CLI, mdBook, or your preferred Markdown renderer

Testing

The project includes comprehensive test coverage:

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Generate coverage report
npm run test:coverage

Test suites cover:

  • Component rendering and interactions
  • API endpoint responses
  • Utility function behavior
  • Integration scenarios

Deployment

Vercel (Recommended)

The application is optimized for Vercel deployment:

# Install Vercel CLI
npm i -g vercel

# Deploy to preview environment
vercel

# Deploy to production
vercel --prod

Manual Deployment

For self-hosted deployments:

# Build production assets
npm run build

# Start production server
npm start

Requirements: Node.js 18+, 512MB RAM minimum

Contributing

We welcome contributions to Vantage402. Please refer to our contribution guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes with descriptive messages
  4. Push to your fork and submit a pull request

Ensure all tests pass and code follows our TypeScript/ESLint standards.

License

Proprietary - All rights reserved

Support & Contact


Built with x402 protocol | Secure, fast, HTTP-native payments

About

A unified payment gateway for x402 protocol integration, providing developers with a streamlined API for cryptocurrency payment processing over x402.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published