{"slug": "freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-in-an-mcp-server", "title": "Freemium for AI Agents: Free vs Paid Tiers via HTTP 402 in an MCP Server", "summary": "AgentBadge implemented a freemium paywall for AI agents in its MCP server using HTTP 402 and the x402 payment scheme, allowing one free request per minute before returning a 402 response with a machine-readable invoice. Agents pay 5 USDC on the Arc Testnet via an EIP-3009 transfer signature to receive a 30-day ServicePass, with the server verifying the on-chain receipt and rejecting replayed transaction hashes with a tx_replayed error. The approach removes the need for API keys, signup, email, or a card, letting an agent see the price, sign a transfer, and gain access in seconds.", "body_md": "# Freemium for AI Agents: Free vs Paid Tiers via HTTP 402 in an MCP Server\n\nHow do you sell freemium to an agent with no card and no checkout form? HTTP 402 + x402: a programmable paywall where the agent pays on-chain in seconds.\n\nFreemium for AI agents works via HTTP 402: one free request per minute, then a 402 response carrying an x402 payment challenge — the agent pays on-chain and gets a 30-day ServicePass, no account or checkout needed.\n\nEvery SaaS has a free tier and a paid tier. But how do you sell the paid tier when the customer is not a person but a program? An agent has no card, cannot fill a checkout form, cannot type a CVV.\n\nWe solved it with **HTTP 402 Payment Required** — a\nstatus code that waited three decades for its moment. It is not an\nerror. It is an invoice.\n\n*Every request passes three doors: a live ServicePass means\ninstant real-time; otherwise the free bucket allows one request per\nminute (a snapshot); otherwise the server answers 402 with an invoice.\nOne USDC transaction (5 USDC on Arc), an on-chain receipt check — and\nthe agent holds a 30-day ServicePass.*\n\n## How the gate works\n\nEvery request to the tracker passes three checks:\n\n1. **Already paid?** If the agent holds a live ServicePass\n(a 30-day access token) — data flows immediately.\n2. **Free allowance?** One request per minute is free. A\nsnapshot, not a stream.\n3. **Neither?** The server answers 402 and attaches an\ninvoice to the response: what, to whom, how much.\n\n## Inside the invoice\n\nThe 402 response is not just text. The `PAYMENT-REQUIRED`\nheader carries a machine-readable payment description:\n\n```\n{\n  \"x402Version\": 2,\n  \"accepts\": {\n    \"scheme\": \"eip3009-client-broadcast\",\n    \"network\": \"eip155:5042002\",\n    \"asset\": \"USDC\",\n    \"amount\": \"5000000\",\n    \"payTo\": \"0xcdd2...699d\",\n    \"maxTimeoutSeconds\": 345600\n  }\n}\n```\n\nThe agent reads it like a price list: the payment scheme (EIP-3009 — a standardized transfer signature), the network (Arc Testnet), the asset (USDC), the amount (5 USDC — the six zeros are decimals, the amount is in base units), the recipient, and the invoice expiry (4 days).\n\n## Why not API keys and billing portals\n\nAn API key needs signup, an email, a card, invoices — a human in the\nloop. 402 + x402 is a *programmable* paywall: the agent sees the\nprice → signs a transfer → pays → gets access. The whole cycle takes\nseconds. For a machine, this is the native way to buy things.\n\n## One payment pays once\n\nAfter paying, the agent retries the request with the transaction hash\nattached. The server checks the blockchain — not a claimed signature,\nbut the real receipt from a block — and opens access. The same hash\ncannot be presented twice: the server atomically claims it, and a second\nattempt gets `tx_replayed`. Even ten parallel requests with\nthe same hash — exactly one gets through.\n\n*Next: the payment itself on Arc — and why gas there is paid in\nUSDC.*\n\n**Links**\n\n- Agent guide (endpoints, limits, examples): [agentbadge.xyz/bstock-guide](https://agentbadge.xyz/bstock-guide)\n- All articles in the series: [agentbadge.xyz/blog](https://agentbadge.xyz/blog)\n- MCP endpoint:\n`https://agentbadge.xyz/mcp/bstock/tools/get_delta`", "url": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-in-an-mcp-server", "canonical_source": "https://agentbadge.xyz/blog/bstock-freemium-402", "published_at": "2026-09-23 00:00:00+00:00", "updated_at": "2026-09-23 18:30:32.638114+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-infrastructure", "ai-products"], "entities": ["AgentBadge", "HTTP 402", "x402", "MCP", "USDC", "Arc Testnet", "EIP-3009", "ServicePass"], "alternates": {"html": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-in-an-mcp-server", "markdown": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-in-an-mcp-server.md", "text": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-in-an-mcp-server.txt", "jsonld": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-in-an-mcp-server.jsonld"}}