# Freemium for AI Agents: Free vs Paid Tiers via HTTP 402 in an MCP Server

> Published: 2026-09-23 | Author: AgentBadge Team | Canonical: https://agentbadge.xyz/blog/bstock-freemium-402

Every 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.

We 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.

![Diagram: the freemium gate](/images/blog/bstock-freemium-402-d1.png)
Diagram: the freemium gate

*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.*

## How the gate works

Every request to the tracker passes three checks:

1. **Already paid?** If the agent holds a live ServicePass
(a 30-day access token) — data flows immediately.

2. **Free allowance?** One request per minute is free. A
snapshot, not a stream.

3. **Neither?** The server answers 402 and attaches an
invoice to the response: what, to whom, how much.

## Inside the invoice

The 402 response is not just text. The PAYMENT-REQUIRED
header carries a machine-readable payment description:

[](#cb1-1){
[](#cb1-2)  "x402Version": 2,
[](#cb1-3)  "accepts": {
[](#cb1-4)    "scheme": "eip3009-client-broadcast",
[](#cb1-5)    "network": "eip155:5042002",
[](#cb1-6)    "asset": "USDC",
[](#cb1-7)    "amount": "5000000",
[](#cb1-8)    "payTo": "0xcdd2...699d",
[](#cb1-9)    "maxTimeoutSeconds": 345600
[](#cb1-10)  }
[](#cb1-11)}
The 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).

## Why not API keys and
billing portals

An 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.

## One payment pays once

After 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.

*Next: the payment itself on Arc — and why gas there is paid in
USDC.*

**Links**

- Agent guide (endpoints, limits, examples): [agentbadge.xyz/bstock-guide](https://agentbadge.xyz/bstock-guide)

- All articles in the series: [agentbadge.xyz/blog](https://agentbadge.xyz/blog)

- MCP endpoint:
https://agentbadge.xyz/mcp/bstock/tools/get_delta

---

## For AI Agents

- Companion guide: https://agentbadge.xyz/agent-guide/articles/bstock-freemium-402
- Knowledge Index: https://agentbadge.xyz/agent-guide/
- LLM entry point: https://agentbadge.xyz/llms.txt
- Engineering services: https://agentbadge.xyz/agent-guide/team/services
