{"slug": "freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-on-arc", "title": "Freemium for AI Agents: Free vs Paid Tiers via HTTP 402 on Arc", "summary": "A developer built a freemium paywall for AI agents using the HTTP 402 Payment Required status code and the x402 payment scheme, letting autonomous programs buy real-time tokenized-stock data without signups or credit cards. Requests pass three checks — a live ServicePass grants real-time access, a free bucket allows one snapshot per minute, and otherwise the server returns a 402 invoice priced at 5 USDC on Circle's Arc blockchain. The server verifies the on-chain receipt and atomically claims each transaction hash, so a replayed hash is rejected even across parallel requests.", "body_md": "Originally published: [https://agentbadge.xyz/blog/bstock-freemium-402](https://agentbadge.xyz/blog/bstock-freemium-402)\n\nTags: ai, api, webdev, cryptocurrency\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 status code that waited three decades for its moment. It is not an error. It is an invoice.\n\nWhy does this matter beyond our tracker? Tokenized stocks trade around the clock, and the traders who watch them increasingly delegate monitoring to AI agents. An agent that cannot pay for its own data is a crippled market participant. Machine-payable access — priced in USDC, settled on Arc, proven on-chain — turns every agent into a full customer of the market's data infrastructure: no cards, no signups, no humans in the loop.\n\n*Every request passes three doors: a live ServicePass means instant real-time; otherwise the free bucket allows one request per minute (a snapshot); otherwise the server answers 402 with an invoice. One USDC transaction (5 USDC on Arc), an on-chain receipt check — and the agent holds a 30-day ServicePass.*\n\nEvery request to the tracker passes three checks:\n\nThe 402 response is not just text. The `PAYMENT-REQUIRED` header 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\nAn API key needs signup, an email, a card, invoices — a human in the loop. 402 + x402 is a *programmable* paywall: the agent sees the price → signs a transfer → pays → gets access. The whole cycle takes seconds. For a machine, this is the native way to buy things.\n\nAnd because it runs on **Arc** — Circle's blockchain where gas itself is paid in USDC — the agent needs exactly one asset in its wallet. One balance covers the payment and the fee. For a market where bStocks themselves settle in USDC, the plumbing finally matches the asset.\n\nAfter paying, the agent retries the request with the transaction hash attached. The server checks the blockchain — not a claimed signature, but the real receipt from a block — and opens access. The same hash cannot be presented twice: the server atomically claims it, and a second attempt gets `tx_replayed`. Even ten parallel requests with the same hash — exactly one gets through.\n\nA paywall a program can read and pay turns data into a first-class on-chain service. More agents able to buy real-time data means more eyes on tokenized markets — tighter deltas, faster convergence, healthier price discovery for everyone who trades them.\n\n*Next: the payment itself on Arc — and why gas there is paid in USDC.*\n\n**Links**\n\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-on-arc", "canonical_source": "https://dev.to/spread2009/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-on-arc-23g4", "published_at": "2026-09-24 11:40:57+00:00", "updated_at": "2026-09-24 11:58:55.088223+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "agent-protocols", "ai-tools"], "entities": ["Arc", "Circle", "USDC", "EIP-3009", "HTTP 402", "x402"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-on-arc", "markdown": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-on-arc.md", "text": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-on-arc.txt", "jsonld": "https://wpnews.pro/news/freemium-for-ai-agents-free-vs-paid-tiers-via-http-402-on-arc.jsonld"}}