Agent Payment Demo LIVE
Watch step by step how an AI agent discovers a service, handles HTTP 402 Payment Required, pays USDC on Base L2, and receives the result — all autonomously, no human in the loop.
1
Agent discovers a service
An AI agent needs the current UTC time. It looks it up in the minia2a catalog:
curl https://minia2a.uk/api/services | jq '.services[] | select(.id=="x402-time")'
{
"id": "x402-time",
"name": "Time",
"endpoint": "https://minia2a.uk/x402/time",
"priceCents": 10,
"category": "utility"
}
2
→
Agent calls the service — gets HTTP 402
The agent sends a request. The server responds with HTTP 402 Payment Required — the x402 protocol in action:
curl https://minia2a.uk/x402/time
HTTP/1.1 402 Payment Required
{
"accepts": [{
"scheme": "exact",
"network": "eip155:8453",
"amount": "100000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0xAb62452b4b019bC4402BFfCca6C706d16d72A7Bf",
"maxTimeoutSeconds": 120
}],
"error": "Payment required"
}
💡 This is the core innovation. Instead of registering for API keys, the agent reads the 402 response, extracts the payment details, and pays autonomously.
3
→
Agent pays USDC on Base L2
The agent constructs an on-chain USDC transfer on Base L2 (or uses the x402 SDK):
import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm';
import { privateKeyToAccount } from 'viem/accounts';
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(account) }],
});
const res = await fetchWithPayment('https://minia2a.uk/x402/time');
console.log(await res.json());
4
→
Agent receives the result
Once payment is verified on-chain, the server processes the request and returns the result. No API key. No signup. No KYC. Just USDC.
HTTP/1.1 200 OK
{
"ok": true,
"utc": "2026-09-12T19:05:31.921Z",
"unix": 1789239931,
"iso": "2026-09-12T19:05:31.921Z",
"timezone": "UTC"
}
What Just Happened?
🔍 Discovery
Agent found the service by describing what it needed — no API docs required. Natural language search across 1,673 services.
💳 Autonomous Payment
No human clicked "Pay". The agent read the 402 response, constructed the USDC transfer, and paid on Base L2. 2-second settlement, sub-cent gas.
🔐 No Secrets
No API keys to provision, rotate, or leak. The agent's wallet signature is its identity. Cryptographic, not credential-based.
📊 Verifiable
Every payment is an on-chain USDC transfer. Auditable. Irreversible. No chargebacks, no fraud — just math.
Popular x402 Services (from live data)
Each of these works the same way: curl → 402 → pay USDC → result. No API keys needed for any of them.