ETHCC 2026 · Cannes, France
Julio M. Cruz · Founder, PerkOS
perkos.xyz · @perk_os
Autonomous agents increasingly need to access APIs, acquire data, rent compute, and pay each other — but every existing payment rail assumes a human is on the other end.
Credit cards require KYC. Subscriptions require account creation. Even most crypto flows require complex wallet UX that agents simply cannot navigate.
No native agent payment primitive — no standard for machine-to-machine value exchange
Communities need micropayments — ranging from $0.001 to $10 per interaction
Existing crypto UX is too complex — wallets, gas, approvals all block automation
The x402 protocol repurposes HTTP's long-dormant 402 Payment Required status code into a fully functional, standards-compatible micropayment handshake. No new infrastructure. No new wallets. Just headers.
The entire negotiation happens within the existing HTTP request lifecycle. The client never needs a redirect, popup, or manual confirmation — making it natively compatible with autonomous agents and automated pipelines.
// Client signs a payment authorization (off-chain)
const payment = {
from: client.address,
to: server.address,
value: parseUnits("0.01", 6), // $0.01 USDC
validAfter: 0,
validBefore: Math.floor(Date.now() / 1000) + 3600,
nonce: randomBytes(32)
};
// EIP-712 typed signature — no gas!
const signature = await wallet.signTypedData(
domain, types, payment
);
// Attach to HTTP request
fetch("/api/data", {
headers: { "X-PAYMENT": encode(payment, signature) }
});The client signs an EIP-712 typed payload off-chain. No gas is spent until the server settles.
validBefore ensures signatures expire, preventing replay attacks.
Random 32-byte nonce guarantees each authorization is unique and one-time-use.
// Express middleware — 10 lines to monetize any endpoint
async function x402Middleware(req, res, next) {
const payment = req.headers["x-payment"];
if (!payment) {
return res.status(402).json({
scheme: "exact",
network: "base",
token: USDC_ADDRESS,
amount: "10000", // $0.01
receiver: SERVER_WALLET
});
}
// Verify signature + settle on-chain
const result = await verifyAndSettle(payment);
if (result.valid) next();
else res.status(402).json({ error: "invalid payment" });
}Challenge — if no payment header, respond 402 with required scheme, network, token, and amount
Verify — validate the EIP-712 signature against the expected parameters
Settle — call transferWithAuthorization on-chain to claim funds atomically
Serve — pass to next() and return the protected resource
import { createX402Server } from "@perkos/x402";
const app = createX402Server({
wallet: SERVER_WALLET,
network: "base",
token: "USDC"
});
// Free endpoint
app.get("/health", (req, res) =>
res.json({ ok: true })
);
// $0.001 per call — community market data
app.get("/api/markets", x402("0.001"),
async (req, res) => {
const data = await getMarketData();
res.json(data);
});
// $0.01 per call — premium analytics
app.get("/api/analytics", x402("0.01"),
async (req, res) => {
const report = await generateReport(req.query);
res.json(report);
});
app.listen(3000);Different endpoints carry different prices. Free health checks co-exist with paid premium routes — all on the same server instance.
The x402() wrapper handles the entire challenge-verify-settle lifecycle. Drop it onto any Express route in seconds.
No subscriptions, no invoicing. Revenue lands in SERVER_WALLET on-chain with every successful request.
Base L2 makes sub-cent transactions economically viable at any scale
Near-instant confirmation means agents don't wait — they transact in real time
Deploy once, collect payments across 16 EVM-compatible networks
USDC natively implements EIP-3009, enabling gasless off-chain signatures that the server redeems on-chain. The payer never touches gas — only the settling server does, and only once per request.
While Base is the recommended default for its speed and Coinbase ecosystem integration, x402 works seamlessly on Celo, Arbitrum, Optimism, Polygon, and 12 more EVM networks — meeting your community where they are.
Hosted verify-and-settle API — no need to run your own settlement node. Call our endpoint, get a result.
On-chain agent profiles via ERC-8004 — discoverable, verifiable identities for autonomous actors.
Agent-to-agent coordination layer — structured task delegation and payment between autonomous agents.
Unified API across 16 EVM networks — one integration, universal reach.
Facilitator API live and accepting requests — verify and settle x402 payments instantly
Running in production today, transacting with x402 on Base mainnet
Full SDK and infrastructure code available on GitHub — fork, extend, contribute
Github.com/JulioMCruz/x402-Demo
Main hub for x402 infrastructure, documentation, and getting started guides. Everything you need to monetize your first endpoint.
Live facilitator API — drop in verify-and-settle without running your own node. Production-ready, multi-chain.
Full open-source SDK. Audit the code, extend the protocol, contribute back to the community.
Any HTTP endpoint. Any community. 10 lines of code. Micropayments for everyone.
Julio M. Cruz · @perk_os · @juliomcruz
Build x402 Micropayment Solutions for Communities