Welcome to PayNode Protocol
PayNode is a stateless, non-custodial Machine-to-Machine (M2M) payment gateway. It bridges the gap between AI Agents and the API economy.
When an AI Agent hits an API that requires payment, it gets stuck. PayNode solves this by standardizing the HTTP 402 Payment Required status code, allowing Agents to autonomously pay for digital resources using USDC on Base L2.
π Why PayNode?
| Traditional Gateways (Stripe) | PayNode | |
|---|---|---|
| Integration | Days of database setup, webhook endpoints, settlement reconciliation | 1-minute SDK drop-in. No database needed. |
| Verification | Asynchronous callbacks, webhook retries, database orders tables | Stateless: verify a txHash on-chain like verifying a JWT |
| Settlement | T+7 or T+2 delays, frozen assets risk | Instant. Atomic 99/1 split β funds arrive in merchant wallet within 2 seconds |
| Agent-Native | Requires UI, manual card input | Zero UI. HTTPS-native silent autonomous payments |
| Privacy | KYC required, identity tracked | Zero KYC. Agent identity never recorded on-chain |
π Documentation
- β‘ Quickstart (1 min) β Build a merchant server + agent client from scratch. Run locally, verify on Basescan.
- π Protocol (x402) β How the
402handshake works, with sequence diagrams and security analysis. - ποΈ Architecture β System design and M2M payment flow overview.
- π¨ JavaScript SDK β Agent client, Express middleware, Permit payments, Token whitelist.
- π¦ Python SDK β Agent client, FastAPI middleware, thread-safe nonce management.
- π Webhooks β Real-time payment notifications with HMAC-SHA256 verification.
- π Smart Contracts β Mainnet/Testnet addresses, RPCs, ABI reference, security features.
- π¨ Error Codes β Troubleshoot any error from SDK, server, or RPC.
π The Vision
We believe in a Sovereign AI Future where machines frictionlessly transact with one another. PayNode provides the missing financial primitive for the machine economy.
Quick Links: GitHub Β· Basescan Router Β· Base Sepolia Explorer