x402 · agentic payments
The next customers of your API won’t have a credit card. They’ll have a wallet.
Your SpendTheBits @handle is an x402-payable endpoint: AI agents pay you in USDC over plain HTTP — no invoices, no accounts, no custodian. Price a resource once; get paid every time a machine wants it.
How a payment happens
One HTTP round trip, one on-chain settlement
The agent asks, you quote
An agent requests your resource and receives HTTP 402 Payment Required with a machine-readable price: amount, asset (USDC), and where to pay — your @handle's endpoint.
The agent signs, gas-free
It signs an EIP-3009 USDC transfer authorization off-chain — no gas token needed — and retries the same request with the payment attached.
Verified, served, settled
The payment verifies and settles on-chain to addresses only your keys control. The agent gets the resource; you got paid, machine-to-machine, with no invoice and no custodian.
GET /x402/@yourhandle/market-report HTTP/1.1
HTTP/1.1 402 Payment Required
{ "accepts": [{ "scheme": "exact", "asset": "USDC",
"maxAmountRequired": "0.25", "payTo": "@yourhandle" }] }
GET /x402/@yourhandle/market-report HTTP/1.1
X-PAYMENT: <signed EIP-3009 USDC authorization>
HTTP/1.1 200 OK → 0.25 USDC settled to your walletBuilt in the open
Proven on Circle’s Arc
We built and demonstrated these agentic payment flows on Arc, Circle’s stablecoin-native blockchain, as part of Circle’s developer program — end to end, from the 402 challenge to on-chain USDC settlement.
Read the Arc build write-up (PDF)Why an @handle beats an API key
An API key gates access; an @handle gets you paid. It’s human-readable, it resolves to addresses your device derived, it doubles as a Lightning address for Bitcoin — and every payment to it is final, on-chain, and yours.
Questions & answers
Agent payments: common questions
What is the x402 protocol?+
x402 is an open payment protocol built on HTTP's 402 Payment Required status code. A server quotes a price in a machine-readable header; the client — typically an AI agent — signs a stablecoin payment authorization and retries the request with it attached. Once the payment verifies, the resource is served. It turns any URL into something an agent can pay.
Can AI agents pay me on SpendTheBits?+
Yes. Your @handle doubles as a public x402-payable endpoint. You attach a USDC price to a resource — an API route, a dataset, a report — and any x402-capable agent can pay it and get the resource in one round trip, with settlement verified on-chain.
Do agents pay gas fees when they pay me?+
No. Payments use EIP-3009 transfer authorizations: the agent signs an off-chain authorization and the settlement layer submits it, so the paying agent needs USDC but not native gas tokens.
What is USDC on Arc?+
Arc is Circle's purpose-built blockchain for stablecoin finance, where USDC acts as the native asset. SpendTheBits built and demonstrated x402 payment flows on Arc during Circle's developer program — see our hackathon write-up linked on this page.
Does SpendTheBits hold the money agents pay me?+
Never. Settlements pay on-chain addresses that only your device's keys control — the same fully non-custodial model as the rest of the app. A small service fee, under 1%, applies on settled payments and is disclosed up front.
Claim your @handle before the agents come knocking.
