Repository
x402-payments
OpenClaw Skill for autonomous AI agent payments via the x402 is an open protocol by Coinbase that enables HTTP-native payments using stablecoins. When a server returns HTTP 402 (Pa · License MIT · Maintenance unknown
- License
- MIT
README
x402-payments
OpenClaw Skill for autonomous AI agent payments via the x402 protocol.
What is x402?
x402 is an open protocol by Coinbase that enables HTTP-native payments using stablecoins. When a server returns HTTP 402 (Payment Required), the client automatically handles payment via on-chain USDC transactions on Base.
⚠️ Warning
This skill handles real money on Base mainnet. Start with small amounts. Never commit .wallet.json to git. See SECURITY.md for details.
Features
- 🔐 AES-256 encrypted wallet storage
- 💰 USDC balance queries (Base chain)
- 🔄 Automatic HTTP 402 payment handling
- 💸 USDC transfers
- 🛡️ Configurable spending limits
Quick Start
# Generate a wallet
python3 scripts/generate_wallet.py
# Check balance
python3 scripts/balance.py
# Make a payment to a 402 endpoint
python3 scripts/pay.py --url https://api.example.com/paid-endpoint
# Transfer USDC
python3 scripts/transfer.py --to 0x... --amount 1.0
License
MIT