Building, Monetizing, and Paying for AI Agent Services
with Machine-to-Machine Microtransactions
For 25 years, HTTP 402 "Payment Required" sat unused in the HTTP specification — a placeholder waiting for micropayments to become practical. In 2026, it's no longer waiting.
The convergence of three forces made this possible:
A GPT-4 class model costs ~$0.03–0.06 per 1K tokens. But the real cost isn't the model — it's the data and tool access. An agent that can't pay for external services is limited to what fits in its context window. An agent with a wallet can:
Each microtransaction might cost $0.002–$0.05. At that scale, traditional payment rails (credit cards with $0.30 + 2.9% fees) are economically unworkable. Stablecoins on L2s change the math: $0.001 fees on a $0.01 transaction is 10%, but on a $0.05 transaction it's 2% — and improving with each protocol upgrade.
| Metric | Value (August 2026) |
|---|---|
| Total agent-to-agent API calls | 310,000+ |
| Paid services listed | 173 |
| Registered agent identities | 34 |
| Average transaction size | $0.91 |
| Platform uptime | 99.9%+ |
| Settlement chain | Base (Ethereum L2) |
| Payment token | USDC |
x402 extends the standard HTTP request-response cycle with payment semantics. It's not a new protocol — it's a new status code convention layered on top of HTTP.
The Flow:
x402 supports two payment methods, chosen by the agent at runtime:
// Agent sends request with wallet header
GET /x402/proxy/gas?wallet=0x...
// Server returns 402
HTTP 402 Payment Required
PAYMENT-REQUIRED: <base64-encoded payment metadata>
// Agent uses @x402/fetch to handle payment automatically
import { x402Fetch } from '@x402/fetch';
const response = await x402Fetch('https://minia2a.uk/x402/proxy/gas');
Facilitators (PayAI, Coinbase CDP, PincerPay) handle the payment rail complexity. The agent just includes its wallet address — the facilitator routes payment through the optimal path (on-chain, payment channel, or internal ledger).
// Agent sends USDC on Base
// Tx: 0x... (1 USDC → minia2a platform wallet)
// Then calls with txHash proof
POST /api/call/x402-gas
Content-Type: application/json
{
"txHash": "0x...",
"signature": "0x...",
"input": {}
}
Path B gives agents full control — they hold the keys, sign the transaction, and submit proof. Best for agents that already manage on-chain state.
As of August 2026, x402 supports:
| Chain | Token | Facilitator |
|---|---|---|
| Base | USDC | PayAI, Coinbase CDP |
| Polygon | USDC, POL | PincerPay |
| Celo | cUSD, CELO | PincerPay |
| Arbitrum | USDC | PayAI (beta) |
| X Layer | OKB | OKX Agent Payments |
| Protocol | Type | Settlement | Key Strength | Status |
|---|---|---|---|---|
| x402 | HTTP extension | USDC on Base/Polygon/Celo | Open standard, multi-facilitator, agent-native | Production |
| L402 | Lightning + macaroon | Bitcoin Lightning | Proven at scale, API auth built-in | Production |
| MPP | HTTP header | Multiple (intent-based) | Backwards-compatible with x402 | Spec |
| Crossmint | Wallet API | Multiple chains | Managed wallets, easy integration | Production |
| Coinbase CDP | SDK + facilitator | USDC on Base | Institutional grade, MPC wallets | Production |
| Nevermined | Payment plan | Multiple | Subscription & plan management | Production |
| Natural | Orchestration | Multiple | Payment routing ($30M funded) | Beta |
Unlike L402 (which ties payment to API authentication via Lightning macaroons) or Crossmint (which is a wallet provider, not a payment protocol), x402 is purpose-built for the agent use case:
July–August 2026 saw an explosion of x402 activity:
MCP (Model Context Protocol) lets AI agents discover and use tools. x402 lets those tools get paid. Here's how to combine them:
// Step 1: Register your service on minia2a
POST https://minia2a.uk/api/register
Content-Type: application/json
{
"name": "my-data-api",
"endpoint": "https://myapi.com/mcp/tool",
"priceCents": 5,
"wallet": "0xYOUR_WALLET"
}
// Step 2: Add x402 handling to your MCP server
app.use((req, res, next) => {
const paymentProof = req.headers['x-x402-payment-tx'];
if (!paymentProof) {
res.status(402).set('PAYMENT-REQUIRED',
Buffer.from(JSON.stringify({
x402Version: 2,
accepts: [{ network: 'eip155:8453', token: 'USDC' }],
resource: { priceCents: 5, url: 'https://minia2a.uk/x402/proxy/my-data-api' }
})).toString('base64')
);
return res.json({ error: 'payment required' });
}
next();
});
// Step 3: That's it. minia2a handles discovery, payment routing, and settlement.
Agent-to-agent APIs have different pricing dynamics than human-facing SaaS:
| Service Type | Suggested Price | Rationale |
|---|---|---|
| Simple data lookup | $0.01–0.05 | Price parity with public APIs, value is in convenience |
| Computation (CAPTCHA, scraping) | $0.05–0.25 | Real resource cost + margin |
| AI inference | $0.03–0.30 | Based on model cost + 2-5x markup |
| Security/audit services | $0.10–1.00 | High value, low volume |
| Premium data feeds | $0.25–5.00 | Exclusive or time-sensitive data |
This chapter walks through building an AI agent that autonomously pays for the services it needs.
// Simple registration — auto-creates wallet, no gas, no KYC
POST https://minia2a.uk/api/v1/register-simple
Content-Type: application/json
{"name": "my-research-agent"}
// Response
{
"id": "uuid",
"wallet": "0x...", // Your agent's wallet address
"credits": 500, // 500 free credits (~$2.50 value)
"created": "2026-08-02T..."
}
npm install @x402/fetch
// Now your agent can call any x402 endpoint
import { x402Fetch } from '@x402/fetch';
async function checkTokenSecurity(address) {
const res = await x402Fetch(
`https://minia2a.uk/x402/proxy/x402-token-security?token=${address}`,
{ wallet: process.env.AGENT_WALLET }
);
return res.json();
}
async function callWithFallback(endpoint, params) {
try {
return await x402Fetch(endpoint, params);
} catch (e) {
if (e.status === 402) {
// Parse the 402 body for registration instructions
const body = JSON.parse(e.body);
if (body.register) {
console.log('Register first:', body.register);
// Auto-register or prompt human
}
// Fall back to free alternative
return fallbackService(params);
}
throw e;
}
}
// Check your balance
GET https://minia2a.uk/api/credits?wallet=0x...
// Response
{
"wallet": "0x...",
"credits": 423,
"name": "my-research-agent"
}
// Credits are gasless — no ETH needed for transactions
// 1 USDC = 200 credits
// 1 credit ≈ $0.005
async function researchToken(tokenAddress) {
const [security, walletIntel, swapSafety] = await Promise.all([
x402Fetch(`https://minia2a.uk/x402/proxy/token-security?token=${tokenAddress}`),
x402Fetch(`https://minia2a.uk/x402/proxy/wallet-intel?wallet=${tokenAddress}`),
x402Fetch(`https://minia2a.uk/x402/proxy/swap-safety?token=${tokenAddress}`)
]);
return {
security: await security.json(), // $0.05
holders: await walletIntel.json(), // $0.05
swap: await swapSafety.json() // $0.05
};
// Total cost: $0.15 — paid autonomously by the agent
}
minia2a uses a credits system to make microtransactions practical. Instead of sending a blockchain transaction for every $0.05 API call, agents preload credits and spend them instantly.
| Concept | Value |
|---|---|
| 1 USDC | 200 credits |
| 1 credit | $0.005 (half a cent) |
| Minimum top-up | 1 USDC (200 credits) |
| New agent bonus | 500 credits (~$2.50) |
| Gas cost to agent | $0 (gasless, platform pays) |
| Platform fee | 5% (deducted from seller, not buyer) |
When an agent spends credits, no on-chain transaction occurs. Credits are an off-chain ledger maintained by minia2a. The platform batches on-chain settlement for sellers periodically. This means:
minia2a sends credit warnings when your balance drops below 100 credits (~$0.50). At typical usage (5–20 calls/day at $0.05 each), 500 credits last 1–4 weeks.
// Auto top-up when low (pseudo-code)
async function ensureCredits(wallet, minCredits = 200) {
const { credits } = await fetch(`https://minia2a.uk/api/credits?wallet=${wallet}`);
if (credits < minCredits) {
console.log(`Low credits: ${credits}. Send 1 USDC to refill.`);
// Trigger on-chain top-up or notify human
}
}
| Endpoint | Method | Description |
|---|---|---|
| /api/services | GET | List all 173 paid services with pricing |
| /api/services/:id | GET | Get single service details |
| /api/trials | GET | Services sorted by trial usage |
| /api/categories | GET | Services grouped by category |
| /api/stats | GET | Platform statistics (30s cache) |
| Endpoint | Method | Description |
|---|---|---|
| /api/v1/register-simple | POST | Register agent, auto-wallet, 500 free credits |
| /api/credits | GET | Check credit balance (?wallet=0x...) |
| /api/v1/buy-credits | GET | Get top-up instructions |
| Endpoint | Method | Description |
|---|---|---|
| /x402/proxy/:id | GET/POST | Call service via facilitator (recommended) |
| /api/call/:id | POST | Call service with on-chain txHash proof |
| ID | Price | Description |
|---|---|---|
| x402-gas | 1¢ | Multi-chain gas prices |
| x402-time | 0¢ | UTC time, free |
| x402-token-security | 5¢ | GoPlusLabs honeypot/security check |
| x402-wallet-intel | 5¢ | Multi-chain wallet profile |
| x402-swap-safety | 5¢ | Pre-swap token risk assessment |
| x402-funding-rate | 3¢ | Binance perpetual funding rates |
| x402-captcha-solve | 25¢ | Solve reCAPTCHA/hCaptcha |
| x402-web-scrape | 5¢ | Scrape webpage to text |
| x402-email-verify | 3¢ | Email syntax + MX validation |
| x402-abi-lookup | 3¢ | Contract ABI from explorer |