🚀Multi-Chain Payment Gateway
A comprehensive multi-chain payment gateway supporting Ethereum, BSC, Arbitrum, Polygon, and Harmony with advanced dashboards, administrative controls, and easy-to-integrate client-side widgets.
✨ Features
Multi-Chain Support
Ethereum Mainnet: Native ETH, WBTC, WETH, USDT, DAI, USDC
Binance Smart Chain: Native BNB, BTCB, USDT, DAI, USDC
Arbitrum One: Native ETH, WBTC, WETH, USDT, DAI, USDC
Polygon: Native MATIC, WBTC, WETH, USDT, DAI, USDC
Harmony One: Native ONE, ETH, BTC, USDT, DAI, USDC
Comprehensive Dashboards
Main Dashboard: Real-time overview of all chains, payments, and system health
Administrative Dashboard: Complete configuration management for chains, widgets, and security
Widget Management: Create, configure, and manage client-side payment widgets
Multi-Chain Monitoring: Live status of all blockchain networks with latency and block data
Client-Side Widgets
Easy Integration: Single script tag deployment
Customizable Themes: Light and dark mode support
Multi-Chain Selection: Users can choose their preferred blockchain
Payment Calculation: Real-time amount calculation with discount support
Event-Driven: Custom events for seamless integration with existing applications
Advanced Features
Discount System: Configurable discount codes and percentages
Transaction Verification: Automatic blockchain verification of payments
Security: Rate limiting, CORS protection, and secure headers
RESTful API: Clean and well-documented endpoints
Real-time Updates: Auto-refreshing dashboards with live data
🛠️ Installation
Clone the repository
Install dependencies
Set up environment variables
Start the server
🔧 Configuration
Environment Variables
Supported Blockchains
cd frontend pnpm install pnpm dev
Backend:
pnpm install pnpm dev
When developing locally run the backend at :3000 and the frontend Vite dev server (default :5173) or use pnpm run frontend:dev from project root which proxies /api to the backend.
| Harmony | ONE | 1666600000 | Harmony Explorer |
📊 Dashboards
Main Dashboard
Access the comprehensive dashboard at http://localhost:3000/dashboard.html
Features:
System Overview: Real-time health, uptime, and environment status
Multi-Chain Status: Connected chains, latency, and network health
Payment Statistics: Transaction volume, success rates, and analytics
Widget Analytics: Integration health and usage metrics
Blockchain Networks: Live status of all supported chains
Administrative Dashboard
Access admin controls at http://localhost:3000/admin-dashboard.html
Features:
Chain Management: Enable/disable chains, configure settings
System Configuration: Payment settings, security controls
Widget Management: Create, configure, and delete widgets
Security Settings: Rate limiting, CORS configuration
🔌 API Endpoints
Base URL
Dashboard Endpoints
Get Dashboard Data
Get Multi-Chain Statistics
Get System Health
Admin Endpoints
Get Configuration
Update Configuration
Chain Management
Widget Endpoints
Generate Widget
Request Body:
List Widgets
Serve Widget Script
🔗 Widget Integration
Quick Integration
Add this script tag to your website:
Custom Container
Specify a custom container for the widget:
Event Handling
Listen for payment events:
Widget Configuration
Widgets support various configuration options:
Type:
payment,calculatorTheme:
light,darkChains: Array of supported chains
Customization: Colors, branding, styling
🧪 Testing
Run the test suite:
Test specific modules:
🔐 Security Features
Multi-Chain Security: Secure transaction verification across all chains
Rate Limiting: Protects against abuse and DDoS attacks
CORS Protection: Configurable origin whitelist
Security Headers: Comprehensive security header configuration
Input Validation: Strict validation of all requests
Environment Isolation: Separate configurations for development and production
🚀 Deployment
Production Setup
Set environment to production
Configure production RPC endpoints
Set up reliable RPC endpoints for all chains
Configure proper rate limits and security settings
Set secure JWT secrets and encryption keys
Use process manager
Docker Deployment
🤝 Integration Examples
E-commerce Integration
Subscription Service Integration
📈 Monitoring and Analytics
The gateway provides comprehensive monitoring:
Real-time Chain Status: Monitor all blockchain networks
Payment Analytics: Track transaction volume and success rates
Widget Performance: Monitor widget usage across domains
System Health: CPU, memory, and network monitoring
Custom Metrics: Configurable business metrics
🆘 Support and Documentation
API Documentation: Available at
/api/docs(when enabled)Widget Documentation: See
/widget-demo.htmlfor examplesConfiguration Guide: Detailed in this README
Troubleshooting: Check logs and health endpoints
📝 License
MIT License - see LICENSE file for details.
🤝 Contributing
Fork the repository
Create a feature branch
Commit your changes
Push to the branch
Create a Pull Request
Built with ❤️ for the multi-chain future
Last updated
Was this helpful?

