x402
the open HTTP standard for agent paymentsx402 revives the long-dormant HTTP 402 "Payment Required" status code as a machine-payable handshake. Servers gate APIs on USDC payment; agents pay on-chain in seconds. As of May 2026, the protocol is live infrastructure: Amazon Bedrock AgentCore Payments (Preview), the Coinbase x402 Bazaar, Stripe Link for agents, TensorFeed, and TerminalFeed all speak it. This page is the canonical hub. What x402 is, who uses it today, how to integrate, and the latest news, all in one place.
TensorFeed is x402-native
14 paid premium endpoints. End-to-end USDC loop verified on Base mainnet on April 27, 2026. AFTA-certified: code-enforced no-charge guarantees plus Ed25519-signed receipts on every paid call. Free tier remains free; pay only when you hit a premium endpoint.
Live: who speaks x402
The set is intentionally small. Live production publishers, canonical SDKs, deployable gateway templates, and the reference spec itself. Pulled live from /api/x402-adopters.
How it works in one round trip
Canonical Coinbase x402 V2 handshake on the exact scheme over an EVM network like Base. This is the wire format AgentCore Payments and the @coinbase/x402 SDK speak.
- 1.Client requests a paid resource:
GET /something - 2.Server responds
402 Payment Requiredwith body{ x402Version, resource, accepts: [...] }. Each accepts entry lists scheme, network (e.g.eip155:8453), amount, asset, payTo, maxTimeoutSeconds. - 3.Client signs an EIP-3009
transferWithAuthorizationfor the requested amount of USDC. Gasless on the agent side: the agent only signs; the server broadcasts. - 4.Client retries with header
X-PAYMENTset to base64 of{ signature, authorization: { from, to, value, validAfter, validBefore, nonce } }. - 5.Server's facilitator broadcasts the authorization to the network, verifies settlement, returns 200 with the data plus a
PAYMENT-RESPONSEheader containing the settlement receipt.
Why x402 wins: the four-property test
When TensorFeed picked an agent payment rail, we ran every credible option against four properties. x402 over USDC on Base is the only stack that hits all four. The full bake-off is in the AFTA companion piece on rail selection.
Open
Public spec, public reference implementations, no vendor approval gate. Anyone can read, fork, ship.
Transparent
Every payment is visible on a public block explorer. Server and client agree on the same on-chain truth.
Instantly final
On-chain confirm in ~2 seconds on Base. No reversals, no chargebacks, no 30-day settlement window.
Sub-cent
L2 gas plus stablecoin transfer is fractions of a cent. Microtransactions are economically viable.
The x402 handshake on the wire
Conceptual example of the Coinbase x402 V2 exact scheme on Base. Field names match the spec at github.com/coinbase/x402.
HTTP/1.1 402 Payment Required
content-type: application/json
{
"x402Version": 2,
"resource": { "url": "https://example.com/article/42" },
"accepts": [{
"scheme": "exact",
"network": "eip155:8453",
"amount": "20000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0x...",
"maxTimeoutSeconds": 60
}]
}X-PAYMENT: <base64 of>
{
"signature": "0x...",
"authorization": {
"from": "0x<agent wallet>",
"to": "0x<payTo>",
"value": "20000",
"validAfter": "1714780000",
"validBefore": "1714780600",
"nonce": "0x<32 bytes>"
}
}HTTP/1.1 200 OK
content-type: application/json
PAYMENT-RESPONSE: <base64 settlement receipt>
{ ...the resource the agent paid for... }Recent x402 coverage on TensorFeed
AWS Just Plugged x402 In. Agent USDC Payments Are Now Cloud-Default.
May 7, 2026Coinbase announced AWS now accepts USDC over x402 for agent payments. The largest cloud just made the open standard a default option.
We Could Have Built AFTA on Anything. We Chose USDC on Base.
May 6, 2026The four-property test for agent payment rails and why USDC on Base passes all four where the alternatives compromise on at least one.
Stripe Just Validated Agent Payments. We Already Shipped Ours Without Them.
May 1, 2026Stripe Link for agents and the stripe x402 method, compared to direct USDC after real production use.
Why We Picked USDC on Base Over Stripe for Agent Payments
Apr 27, 2026A first-person breakdown of the architectural choice, what we gave up, and what we got: simpler architecture, lower fees, no platform risk.
15 Paid AI Agent API Endpoints in 24 Hours
Apr 27, 2026A retrospective on shipping 15 pay-per-call premium endpoints, full SDKs, MCP server expansion, and a human dashboard in a single 24-hour build.
We Validated Agent Payments End-to-End on Base Mainnet
Apr 27, 2026The five-step USDC payment loop that took TensorFeed agent payments from designed to operational. Real tx hash, real credits.
V1 and V2: the format split
x402 has two coexisting formats in the wild as the protocol matures. V1 was the original Coinbase reference (network and asset declared as separate fields). V2 added the discovery manifest at /.well-known/x402 and the eip155-style network identifier (e.g. eip155:8453 for Base mainnet). x402scan currently lists V2 publishers; x402.org documents both. The cleanest path for new publishers is V2 with the well-known manifest, plus an x-payment-info extension on each paid OpenAPI operation. The afta-gateway template ships with both formats wired correctly out of the box.
FAQ
What is x402?
x402 is an open HTTP-native payment protocol that revives the long-dormant HTTP 402 Payment Required status code as a machine-payable handshake. Servers gate API responses on payment; clients retry with proof of payment. Designed for AI agents, machine-to-machine commerce, and any caller without a human in the loop. Reference spec at x402.org, maintained by Coinbase Developer Platform with broad community participation.
How does x402 work in one round trip?
Client requests a paid endpoint. Server responds 402 Payment Required with a JSON body containing x402Version, resource, and an accepts array (scheme, network, amount, asset, payTo, maxTimeoutSeconds). For the Coinbase reference exact scheme on EVM networks like Base, the client signs an EIP-3009 transferWithAuthorization (gasless from the agent’s side), wraps it as a PaymentPayload (signature plus authorization fields from, to, value, validAfter, validBefore, nonce), and base64-encodes the result. The client retries with header X-PAYMENT set to that base64 string. The server’s facilitator broadcasts the authorization, verifies on-chain settlement, and returns 200 with the data plus a PAYMENT-RESPONSE header containing the settlement receipt. No accounts, no API keys for billing, no signup form, no invoice cycle.
Who actually uses x402 today?
As of May 2026, the live adopter set includes Coinbase (reference SDK and the spec itself), Amazon Bedrock AgentCore Payments (Preview, launched May 7 2026, with native x402 execution and a Coinbase x402 Bazaar MCP server exposing 10,000+ pay-per-use endpoints), Stripe (Link for agents using the stripe x402 method variant), TensorFeed (14 paid premium endpoints, AFTA-certified, end-to-end USDC loop verified on Base mainnet April 27 2026), TerminalFeed (federated with TensorFeed via the AFTA cross-Worker rail), the @coinbase/x402 SDK, the tensorfeed Python and JavaScript SDKs, the afta-gateway Cloudflare Worker template, and the tensorfeed-mcp MCP server. Live adopter directory at tensorfeed.ai/x402-adopters.
Why x402 instead of Stripe or a traditional payment API?
Traditional payment APIs assume a human at a keyboard filling out a signup form, attaching a credit card, and copying an API key. AI agents have none of those primitives. x402 lets agents act on their own spending decisions in a single round trip, settling on-chain in seconds with no chargebacks, no merchant-account termination risk, and microtransactions that are economically viable (sub-cent gas on L2s like Base). Stripe Link for agents reuses the x402 envelope with a stripe method variant, so the protocol is cooperative not adversarial.
What is the .well-known/x402 manifest?
In x402 V2, services that support the protocol publish a discovery manifest at /.well-known/x402 listing every paid endpoint with its accepts block (asset, network, amount, payTo), input/output schemas, and metadata. Facilitators like CDP Bazaar and x402scan crawl this manifest to auto-index services so x402-compatible agents can discover them without manual directory submission. TensorFeed publishes its manifest at /.well-known/x402.json.
What about V1 vs V2?
Two coexisting formats are in the wild as the protocol matures. V1 is the original Coinbase reference (network and asset declared as separate fields). V2 added the discovery manifest and the eip155-style network identifier (e.g. eip155:8453 for Base mainnet). x402scan currently lists V2 publishers; x402.org documents both. The cleanest path for new publishers is V2 with the well-known manifest plus an x-payment-info extension on each paid OpenAPI operation.
How do I add x402 to my own API?
Three options ranked by effort. Drop-in: fork github.com/RipperMercs/afta-gateway, set 3 secrets (Worker secret, USDC payTo wallet, Ed25519 receipt signing key), deploy. Library: install @coinbase/x402 and add its middleware to your Express, Fastify, or Hono app. Hand-rolled: implement the 402 handshake yourself in ~50 lines, verify the X-Payment-Tx receipt against an RPC node. The afta-gateway template is the recommended path for any publisher who also wants AFTA primitives (signed receipts, code-enforced no-charge ledger).
?category=publisher|sdk|gateway|reference|spec or ?status=live|announced. Free, no auth, cached 10 min. TensorFeed's own x402 manifest lives at /.well-known/x402.json.Further reading
- x402.org (official spec)
- github.com/coinbase/x402 (reference implementations)
- /glossary/x402 (definition entry)
- /x402-adopters (full filterable directory)
- /agent-fair-trade (the AFTA standard built on top of x402)
- /developers/agent-payments (TensorFeed integration docs)