AGENT-TO-MACHINE PROTOCOL LIVE ON BASE MAINNET

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.

Read the Docs
x402 v2 PAYMENT ARCHITECTURE

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.

Method 1

On-chain

Router.pay()

Agent detects 402, signs and submits an on-chain transaction via PayNode Router, then retries the request with the txHash.

~2s settlement
Merchant verifies txHash
Immediate finality on-chain

Best for: High-value APIs, real-time settlement, direct merchant payouts

Recommended

EIP-3009

Off-chain Signing

Agent signs a TransferWithAuthorization off-chain, sends the signature to the merchant. Merchant decides: serve data first, verify later.

<50ms signing, agent pays zero gas
Merchant submits on-chain & pays gas
Agent pays zero gas fees

Best for: High-frequency APIs, latency-sensitive agents, gasless UX

Coming Soon

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.

Instant data access
Batch settlement via smart contract
Optimized gas via aggregation

Best for: Micro-transactions, high-volume M2M, cost-optimized pipelines

Payment Flow Comparison

StepOn-chainEIP-3009Async
1. Agent detects 402
2. Payment executionOn-chain txOff-chain signOff-chain sign
3. Data deliveryAfter verify txAfter verify sigImmediate
4. SettlementInstantMerchant submitsBatched
5. Gas costAgent paysMerchant paysShared (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.

Waiting for execution...
Protocol Status: Deployed on Base Mainnet

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.

Enter Explorer
Router: 0x4A73696ccF76E7381b044cB95127B3784369Ed63

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.

Base Mainnet Active

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.

Go to Sandbox
Base Sepolia Sandbox
Universal SDK — one API, three payment methods

Two lines of code to integrate.

Merchant decides payment method via accepts array. SDK follows.

MERCHANT (MONETIZE)
express-js (Node.js)
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!' });
});
fastapi.py (Python)
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.

AGENT (USER / PAY)
agent-sdk.py (Python)
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())
agent-sdk.js (JavaScript)
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.