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 to solve a captcha. It searches minia2a for "captcha":

# Agent searches the marketplace
curl https://minia2a.uk/api/services?search=captcha

{
  "name": "Captcha Solve",
  "price": "0.05 USDC",
  "endpoint": "/api/v1/captcha-solve",
  "protocol": "x402"
}
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:

# Agent makes the API call
curl https://minia2a.uk/api/v1/captcha-solve \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/captcha.png"}'

HTTP/1.1 402 Payment Required
X-Payment: x402 USDC 0.05 on Base
X-Payment-Address: 0xf16F0882de08315B438E9f3a2Abfb2d2E5d94ECA
X-Payment-Network: base

{
  "error": "payment_required",
  "amount": "0.05",
  "currency": "USDC",
  "network": "base",
  "recipient": "0xf16F...4ECA"
}

💡 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):

# Agent executes USDC transfer on Base
# Using ethers.js / viem / x402 SDK:

import { pay } from '@x402/evm';

const receipt = await pay('https://minia2a.uk/api/v1/captcha-solve', {
  wallet: agentWallet,
  body: { url: 'https://example.com/captcha.png' }
});

// Under the hood:
// 1. Sends request → gets 402 + invoice
// 2. Transfers 0.05 USDC on Base (~2s, <$0.01 gas)
// 3. Resends with payment proof → gets result

console.log(receipt); // { captchaText: "A7xK2" }
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
X-Payment-Status: verified

{
  "captchaText": "A7xK2",
  "confidence": 0.97,
  "timeMs": 2340
}

What Just Happened?

🔍 Discovery

Agent found the service by describing what it needed — no API docs required. Natural language search across 172 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)

Loading...

Each of these works the same way: curl → 402 → pay USDC → result. No API keys needed for any of them.

Get Started → Read the Quickstart