An Open x402 Payment Gateway for Humans and AI Agents.
ZeroPay is an early-stage Rust project in the AI payments / x402 ecosystem, focused on a2a, crypto, eip8004, payment. It currently has 3 GitHub stars and 0 forks, and sits alongside related tools like internet-court-skill, lucid-agents, x402-erc8004-agent.
An open-source, self-hosted x402 payment facilitator for AI agents and autonomous systems.
Features • Quick Start • Documentation • Platform • Contributing
ZeroPay is a lightweight, self-hosted x402 payment facilitator built with Rust. It enables AI agents and autonomous systems to programmatically discover, authorize, and settle stablecoin payments using EIP-3009 gasless transfers — with no manual wallet management or blockchain infrastructure required.
transferWithAuthorization — payer signs off-chain, payee covers gas/x402/discoveryConfigure your settings in docker-compose.yml:
environment:
- MNEMONICS=your twelve or twenty four word mnemonic phrase
- WALLET=0xYourWalletAddress
- APIKEY=your-secure-api-key
Configure blockchain in config.toml:
[[chains]]
chain_type = "evm"
chain_name = "base-sepolia"
latency = 1
estimation = 12
commission = 5
commission_min = 50
commission_max = 200
admin = "0xYourAdminPrivateKey"
rpc = "https://base-sepolia.g.alchemy.com/v2/YOUR-API-KEY"
tokens = ["USDC:0xYourUSDCAddress:2"]
The :2 suffix marks a token as x402-compatible (EIP-3009).
Start all services:
docker-compose up -d
Verify x402 support:
curl "http://localhost:9000/x402/support?apikey=your-api-key"
See DEPLOYMENT.md for detailed setup instructions.
┌─────────────────────────────────────────────────────┐
│ AI Agent │
│ │
│ 1. GET /x402/requirements → discover payee addr │
│ 2. Sign EIP-712 authorization off-chain │
│ 3. POST /x402/payments → settle on-chain │
│ 4. Receive tx hash + confirmation │
└─────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ ZeroPay API │
│ │
│ /x402/requirements — payment requirements │
│ /x402/payments — verify + settle │
│ /x402/support — supported schemes │
│ /x402/discovery — browse available services │
└───────────────────────┬─────────────────────────────┘
│ transferWithAuthorization
▼
┌─────────────────────────────────────────────────────┐
│ Blockchain (EVM) │
│ EIP-3009 gasless token transfer │
└─────────────────────────────────────────────────────┘
Payment flow:
GET /x402/requirements with customer + amount → gets a payee address and accepted payment schemesPOST /x402/payments with the signed authorizationtransferWithAuthorization on-chainzeropay/
├── api/ # REST API server (Axum)
├── scanner/ # Chain scanner + x402 asset initialization
├── x402/ # x402 protocol types, facilitator, client SDK
├── config.toml # Chain and token configuration
├── Dockerfile
└── docker-compose.yml
git clone https://github.com/zpaynow/zeropay.git
cd zeropay
cargo build --release
./target/release/api
For a hassle-free experience, use our managed platform at zpaynow.com:
Setup: Register at zpaynow.com and use https://api.zpaynow.com as your API endpoint.
We welcome contributions!
Email [email protected] instead of using the issue tracker.
.env files or private keysThis project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Usage Notice: This software is intended for merchant self-hosting only — to run your own payment gateway for your own store or service. It may not be used to build or operate a payment business, payment platform, or SaaS product that serves other merchants. If you need a managed solution, use zpaynow.com.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
Lucid Agents Commerce SDK. Bootstrap AI agents in 60 seconds that can pay, sell, and participate in agentic commerce supply chains. Our protocol agnostic SDK provides CLI-generated templates and drop-in adapters for Hono, Express, Next.js, and TanStack, giving you instant access to crypto/fiat payment rails (AP2, A2A, x402, ERC8004).
AI agent stack that combines A2A messaging + x402 micropayments + ERC‑8004 identity(trustless agent).
Agent behavior that compiles
An open SDK for agentic payments. Let AI agents make payments, hold funds, and move money across chains with policy enforcement and human approval built in.
x402 payments in Rust: verify, settle, and monitor payments over HTTP 402 flows
Context-aware agentic LLM gateway & router that optimize your agentic workflows with every runs, works with any harnesses, any models, any workflows.
Production-ready x402 facilitator server.
Rust SDK for the x402 payment protocol.