With x402, an agent pays per call in USDC on Base — no signup, no card, no human in the loop. The server says how much; the agent signs a stablecoin payment and retries; a facilitator settles it on-chain. Here is exactly how the loop works.
x402 · USDC · Base mainnet
With x402, an agent pays per call in USDC on Base — no signup, no human in the loop. The server replies 402 with payment requirements; the agent signs a USDC payment (EIP-3009) and retries with an X-PAYMENT header; a facilitator settles it on-chain and the call goes through. patternfetch implements this on Base mainnet with real USDC.
x402 takes the long-dormant HTTP 402 Payment Required status code and turns it into a real, machine-to-machine handshake. The whole exchange happens inside one ordinary HTTP round trip the agent already knows how to make:
402. The server answers with HTTP 402 and an x402 body describing the payment requirements — asset = USDC, the amount, the payTo address, and network = base.EIP-3009 transferWithAuthorization — a gasless, off-chain signature that authorizes exactly the required amount of USDC to the payTo address. No on-chain action yet, just a signed message.X-PAYMENT header. It re-sends the identical request, now carrying the signed payment payload in the X-PAYMENT header.X-PAYMENT-RESPONSE header confirming what settled.This is the same model the "x402 Bazaar" indexes — a directory of x402-payable endpoints that agents can discover and pay automatically. patternfetch advertises its own x402 endpoint for discovery at /.well-known/x402.json.
Traditional API access assumes a human: someone signs up, gets an API key, enters a credit card, and clicks through a billing portal. None of that is something an autonomous agent can do mid-loop. x402 removes every one of those steps:
An agent can discover an endpoint, pay for it, and use it in a single loop — pricing comes from the 402 response, payment comes from its own wallet, and the result comes back in the same exchange. Pair x402 with MCP + one-click OAuth and onboarding drops to zero friction: an agent connects, and if it ever needs more than the free tier, it just pays.
patternfetch is an agent-first crypto market-data API and MCP server, and it is payable two ways:
POST /v1/topup with USDC on Base mainnet. No signup, no human.POST /v1/checkout.1 USDC = $1 of credit. Once you hold credit, calls are metered — a market-state brief is $0.01. And you do not have to pay to find out whether it is useful:
There is a free no-signup demo (POST /v1/demo returns a real brief with no key) and a free key with starter credit (POST /v1/keys, no card). So an agent can prove the data is worth paying for before it ever signs a USDC payment. See pricing →
When a paid endpoint needs payment, the server returns HTTP 402 with a body roughly like this — the agent reads it, picks an entry it can satisfy, and signs:
HTTP/1.1 402 Payment Required
Content-Type: application/json
{
"x402Version": 1,
"accepts": [
{
"scheme": "exact",
"network": "base",
"asset": "<USDC contract on Base>",
"payTo": "0xPatternfetchReceivingAddress",
"maxAmountRequired": "10000",
"resource": "https://patternfetch.com/v1/topup",
"description": "Top up patternfetch credit (USDC)"
}
]
}
POST /v1/topup HTTP/1.1
Host: patternfetch.com
X-PAYMENT: <base64 signed USDC
authorization (EIP-3009)>
# Client libs like x402-fetch build the
# X-PAYMENT header for you: they read the
# 402, sign the USDC transfer with your
# wallet, and re-send the request — no
# manual signing, no account, no human.
# → 200 OK
# X-PAYMENT-RESPONSE: <settlement proof>
maxAmountRequired is in USDC base units (6 decimals), so 10000 = 0.01 USDC. Libraries such as x402-fetch (or x402-axios) wrap your normal HTTP client: you make the request as usual, and on a 402 they handle reading the requirements, signing with your wallet, and retrying — transparently.
A few things worth stating plainly:
An open protocol that revives HTTP 402 Payment Required for machines. A server that wants payment answers with 402 plus a JSON description of what to pay (asset, amount, recipient, network); the client signs a stablecoin payment, retries with an X-PAYMENT header, and a facilitator verifies and settles it on-chain. It lets software pay per request with no account and no human.
No. There is no signup and no card. The agent just needs a wallet holding USDC on Base. It reads the price from the 402, signs a USDC authorization, and retries. patternfetch also offers a free no-signup demo and a free key, so an agent can try before paying.
USDC on Base mainnet. The 402 challenge specifies scheme exact, network base, the USDC asset address, the payTo address, and the amount. Because it is mainnet, payments are real and irreversible.
Yes. Humans can top up patternfetch credit with a Stripe card via /v1/checkout. Agents use x402 (USDC on Base) via /v1/topup. 1 USDC = $1 credit; calls are then metered ($0.01 per brief). See pricing.
Try free — no signup Read the docs
More: Pricing · Docs · How-to · Try it live · discovery at /.well-known/x402.json