🏠 Introduction

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
IntegrationDays of database setup, webhook endpoints, settlement reconciliation1-minute SDK drop-in. No database needed.
VerificationAsynchronous callbacks, webhook retries, database orders tablesStateless: verify a txHash on-chain like verifying a JWT
SettlementT+7 or T+2 delays, frozen assets riskInstant. Atomic 99/1 split β€” funds arrive in merchant wallet within 2 seconds
Agent-NativeRequires UI, manual card inputZero UI. HTTPS-native silent autonomous payments
PrivacyKYC required, identity trackedZero KYC. Agent identity never recorded on-chain

πŸ“š Documentation

  1. ⚑ Quickstart (1 min) β€” Build a merchant server + agent client from scratch. Run locally, verify on Basescan.
  2. πŸ“‘ Protocol (x402) β€” How the 402 handshake works, with sequence diagrams and security analysis.
  3. πŸ—οΈ Architecture β€” System design and M2M payment flow overview.
  4. 🟨 JavaScript SDK β€” Agent client, Express middleware, Permit payments, Token whitelist.
  5. 🟦 Python SDK β€” Agent client, FastAPI middleware, thread-safe nonce management.
  6. πŸ”— Webhooks β€” Real-time payment notifications with HMAC-SHA256 verification.
  7. πŸ“œ Smart Contracts β€” Mainnet/Testnet addresses, RPCs, ABI reference, security features.
  8. 🚨 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


MIT 2026 Β© Nextra.