URL shortener
proxy402 is a growing Go project in the AI payments / x402 ecosystem, focused on ai, ai-agents, coinbase, llm. It currently has 26 GitHub stars and 7 forks, and sits alongside related tools like x402, ClawRouter, nano-currency-mcp-server, awesome-agent-protocols, ClawRouter, x402.
Proxy402 lets you monetize APIs by requiring x402 payments on Base before accessing your endpoints.
Test Proxy402 instantly with our pre-configured client:
# Clone the repo
git clone https://github.com/Fewsats/proxy402.git
cd proxy402/client
# Copy sample env file
cp .env.example .env
# Add your wallet keys to the .env file
# You can generate these keys with cast (google how to install foundry, cast is part of the suite)
# Then run the following command to get a test address
cast w new
# You will need Base Sepolia ETH & USDC. Get them from these faucets:
- [Base Sepolia ETH](https://portal.cdp.coinbase.com/products/faucet)
- [Base Sepolia USDC](https://faucet.circle.com/)
# Install dependencies
npm install
# Run client against a test endpoint (returns Bitcoin whitepaper)
npm run client https://proxy402.com/wUUbqudYsM
# Clone the repo (if you haven't already)
git clone https://github.com/Fewsats/proxy402.git
cd proxy402
# Configure environment
cp .env.example .env
# Edit .env file with your details
# Start the server with Docker Compose
docker compose up
Important .env variables:
X402_PAYMENT_ADDRESS: Your Base wallet address for receiving payments (works for Base Sepolia & Base Mainnet)GOOGLE_CLIENT_ID & GOOGLE_CLIENT_SECRET: For auth (obtain from Google Cloud Console)http://localhost:8080 and log inhttp://localhost:8080/YOUR_SHORT_CODEProxy402 adds a Proxy402-Secret header to forwarded requests:
// Node.js example
app.get('/api/data', (req, res) => {
if (req.headers['proxy402-secret'] !== 'YOUR_SECRET_FROM_USER_SETTINGS') {
return res.status(403).json({ error: 'Unauthorized' });
}
res.json({ data: 'Your protected data' });
});
The client uses your private key to make payments on Base:
# client/.env
PRIVATE_KEY="YOUR_CLIENT_WALLET_PRIVATE_KEY" # Never commit this to Git
# Create route via API
curl -X POST http://localhost:8080/links/shrink \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"target_url": "https://raw.githubusercontent.com/ibz/bitcoin-whitepaper-markdown/refs/heads/master/bitcoin-whitepaper.md",
"method": "GET",
"price": "0.0001",
"is_test": true
}'
For more details visit x402.org
If using file uploads with Cloudflare R2, configure CORS to allow direct browser uploads:
You can configure it via Cloudflare dashboard:
http://localhost:3009 and https://your-domain.com*)Join our Discord for support and discussions.
💸 Enable seamless, low-cost digital dollar payments with x402—zero fees, instant settlement, and no high minimums for all users.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
Send Nano currency from AI agents/LLMs
A curated list of protocols and standards for AI agents — MCP, A2A, ACP, AG-UI, AP2, x402, and 50+ more, organized by stack layer
⚡ Route requests to the most cost-effective model with ClawRouter—one wallet, over 30 models, no API keys needed.
💸 Simplify payments with x402, an open protocol for fast, fee-free digital dollar transactions. Experience seamless integration and instant settlements.
Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
Golang SDK for A2A Protocol
Publishes localhost services to the agentic web through self-hostable, trustless relays with x402 payments.
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.
Go implementation of the x402 payment protocol