Pay with crypto on any e-commerce site using ZetaChain's omnichain technology. ZetaPay is a browser extension that enables seamless cryptocurrency payments across the web.
- β Universal Payment Gateway - Works on any e-commerce website
- β Multi-Token Support - Pay with USDC, ETH, ZETA, or other tokens
- β Omnichain Technology - Powered by ZetaChain for cross-chain transactions
- β Non-Custodial - Users maintain full control of their funds
- β MetaMask Integration - Seamless wallet connection
- β Real-Time Price Conversion - Automatic fiat-to-crypto conversion
- β Transaction History - Complete payment tracking
- β Professional Dark Mode UI - Modern, sleek design
zetachain-payment-app/
βββ contracts/ # Smart contracts (Solidity)
β βββ UniversalPayment.sol
β βββ SwapHelperLib.sol
β βββ test/
βββ web/
β βββ public/ # Browser extension
β βββ index.html # Popup interface
β βββ popup.js # Extension logic
β βββ wallet-manager.js
β βββ content.js # Page injection
β βββ manifest.json
βββ backend/ # API server (Node.js)
βββ test-checkout.html # Test page
Deployed on ZetaChain Athens Testnet
- Contract Address:
0xaC24d3E7b5cFDCf2DD1c3a1feB0AbCCd98301852 - Network: ZetaChain Athens 3 Testnet (Chain ID: 7001)
- Explorer: View Contract
- Multi-token payment processing
- Automatic token swapping via UniswapV2
- Payment state management (pending β completed/cancelled)
- Secure fund transfers with reentrancy protection
- Chrome Extension (Manifest V3)
- Vanilla JavaScript
- Web3.js / Ethers.js
- MetaMask Integration
- Solidity ^0.8.26
- Hardhat
- OpenZeppelin
- ZetaChain Protocol
- Node.js + Express
- PostgreSQL
- WebSocket (real-time updates)
- JWT Authentication
1. Open Chrome
2. Navigate to chrome://extensions/
3. Enable "Developer mode"
4. Click "Load unpacked"
5. Select: zetachain-payment-app/web/publicAdd ZetaChain Athens Testnet:
Network Name: ZetaChain Athens
RPC URL: https://zetachain-athens-evm.blockpi.network/v1/rpc/public
Chain ID: 7001
Currency Symbol: ZETA
Block Explorer: https://athens.explorer.zetachain.com
Get testnet ZETA for gas fees:
- Open
test-checkout.htmlin your browser - Click the ZetaPay extension icon
- Connect your MetaMask wallet
- Click "Pay with Crypto" on the test page
- Confirm the transaction
-
Connect Wallet
- Click the ZetaPay extension icon
- Click "Connect Wallet"
- Approve in MetaMask
-
Make a Payment
- Browse any e-commerce site
- ZetaPay automatically detects checkout pages
- Click "Pay with Crypto" button
- Select your preferred token (USDC, ETH, ZETA)
- Confirm the transaction
-
View History
- Click the extension icon
- Navigate to "History" tab
- View all past transactions with blockchain links
- Node.js v18+
- npm or yarn
- MetaMask browser extension
- Git
cd contracts
npm installcd web
npm installcd backend
npm installCreate .env files in each directory:
PRIVATE_KEY=your_wallet_private_key
ZETA_TESTNET_RPC=https://zetachain-athens-evm.blockpi.network/v1/rpc/publicDATABASE_URL=postgresql://user:password@localhost:5432/zetapay
JWT_SECRET=your_secret_key
PORT=3000cd contracts
npx hardhat compile
npx hardhat run scripts/deploy.ts --network zeta_testnetcd backend
npm run devcd web
npm run buildcd contracts
npx hardhat test# Open test-checkout.html in browser
# Or serve with a local server:
npx serve . -p 8000
# Navigate to http://localhost:8000/test-checkout.htmlUser β E-commerce Site β ZetaPay Extension β MetaMask β Smart Contract β ZetaChain
β
Transaction Confirmed
β
Backend API (tracking)
β
Transaction History
-
Content Script (
content.js)- Detects checkout pages
- Injects "Pay with Crypto" button
- Extracts order details
-
Popup Interface (
index.html+popup.js)- Wallet connection
- Payment confirmation
- Transaction status
-
Wallet Manager (
wallet-manager.js)- MetaMask integration
- Account management
- Transaction signing
-
Smart Contract (
UniversalPayment.sol)- Payment processing
- Token swapping
- State management
-
Backend API
- Transaction tracking
- User authentication
- Payment history
- β Non-custodial - Users control their private keys
- β Reentrancy protection - OpenZeppelin ReentrancyGuard
- β Secure contract - Audited code patterns
- β No private key storage - MetaMask handles all signing
- β Content Security Policy - Prevents XSS attacks
- Smart contract development
- Browser extension UI
- MetaMask integration
- Basic payment flow
- Contract deployment to testnet
- Extension testing
- Test checkout page
- Multi-chain support (Ethereum, Polygon, BSC)
- Merchant dashboard
- Payment gateway API
- Off-ramp integration (crypto β fiat)
- Security audit
- Mainnet deployment
- Chrome Web Store submission
- Partnership with payment processors
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub: Parthkk90/ZetaPay
- ZetaChain: zetachain.com
- Smart Contract: View on Explorer
- Testnet Faucet: Get ZETA
Developer: Parthkk90
For issues, questions, or suggestions:
- Open an Issue
- Contact via GitHub
- ZetaChain for omnichain infrastructure
- OpenZeppelin for secure smart contract libraries
- MetaMask for wallet integration
- Community for feedback and support
Made with β€οΈ using ZetaChain
β Star this repo if you find it useful!