The Payment Gateway
for AI Agents.
Drop-in x402 middleware. Let your AI autonomously pay for APIs with USDC on Base L2. No KYC, No custodial risk, 100% Deterministic.
Three ways to pay. Zero compromise.
PayNode supports synchronous on-chain settlement, gasless off-chain signing, and a future async model for high-frequency M2M payments.
On-chain
Router.pay()
Agent detects 402, signs and submits an on-chain transaction via PayNode Router, then retries the request with the txHash.
Best for: High-value APIs, real-time settlement, direct merchant payouts
EIP-3009
Off-chain Signing
Agent signs a TransferWithAuthorization off-chain, sends the signature to the merchant. Merchant decides: serve data first, verify later.
Best for: High-frequency APIs, latency-sensitive agents, gasless UX
Async Settlement
Batched Payouts
Agent signs off-chain as usual. A settlement contract delivers merchant data first, then batches and settles transactions periodically or by volume.
Best for: Micro-transactions, high-volume M2M, cost-optimized pipelines
Payment Flow Comparison
| Step | On-chain | EIP-3009 | Async |
|---|---|---|---|
| 1. Agent detects 402 | ✓ | ✓ | ✓ |
| 2. Payment execution | On-chain tx | Off-chain sign | Off-chain sign |
| 3. Data delivery | After verify tx | After verify sig | Immediate |
| 4. Settlement | Instant | Merchant submits | Batched |
| 5. Gas cost | Agent pays | Merchant pays | Shared (optimized) |
$_Experience x402-v2 in Seconds.
AI agents don't have credit cards. PayNode turns standard HTTP 402 errors into deterministic USDC payments. Pick a method below and watch the handshake.
Protocol Status
The PayNode protocol is deterministically deployed on Base Mainnet via CREATE2. Contract addresses are consistent across all EVM chains, ensuring deterministic addressing for Agent payments.
Mainnet: 100% Production Ready
Mainnet router is locked. Merchants can integrate the SDK to receive USDC payments immediately. The protocol executes an atomic 99% / 1% split without centralized custody.
Sandbox: Simulate Instantly
Switch to Sandbox mode in the Explorer to perform one-click simulations with our faucet wallet. Observe how Agents handle 402 errors and complete on-chain payments in real-time.
Two lines of code to integrate.
Merchant decides payment method via accepts array. SDK follows.
import { x402Gate } from '@paynodelabs/sdk-js';
// Drop-in middleware (Base Mainnet)
app.get('/api/data', x402Gate({
merchantAddress: '0xYourWallet...',
price: '1.00', // 1.00 USDC
// For Sandbox/Testnet, pass configuration:
// chainId: 84532,
// rpcUrls: ['https://sepolia.base.org'],
// tokenAddress: '0x65c088EfBDB0E03185Dbe8e258Ad0cf4Ab7946b0'
}), (req, res) => {
res.json({ data: 'Hello from AI Economy!' });
});from paynode_sdk import PayNodeMiddleware
# Minimalist for Mainnet
app.add_middleware(
PayNodeMiddleware,
merchant_address="0xYourWallet...",
price="1.00", # 1.00 USDC
# For Sandbox/Testnet, add:
# chain_id=84532,
# rpc_urls=["https://sepolia.base.org"],
# token_address="0x65c088EfBDB0E03185Dbe8e258Ad0cf4Ab7946b0"
)How it works: Middleware returns 402 with accepts array.
Merchant controls method priority — SDK picks the first available.
from paynode_sdk import PayNodeAgentClient
# Default is Mainnet. For Sandbox, pass rpc_urls:
# agent = PayNodeAgentClient(private_key="0x...", rpc_urls=["https://sepolia.base.org"])
agent = PayNodeAgentClient(private_key="0x...")
# Auto-selects EIP-3009 or On-chain
response = agent.request_gate("https://api.merchant.com/data")
print(response.json())import { PayNodeAgentClient } from '@paynodelabs/sdk-js';
// Default is Mainnet. For Sandbox, pass rpcUrl:
// const agent = new PayNodeAgentClient(key, 'https://sepolia.base.org');
const agent = new PayNodeAgentClient(process.env.PRIVATE_KEY);
// Auto-selects EIP-3009 or On-chain
const res = await agent.requestGate('https://api.merchant.com/data');
const { data } = await res.json();SDK behavior: Picks first method from merchant's accepts array.
No agent-side preference — merchant controls the flow.