What Coinbase provides for x402
Coinbase started x402 and publishes the specification and open-source libraries for clients and servers. Through the Coinbase Developer Platform (CDP) it also runs a hosted facilitator that verifies and settles payments, plus AgentKit for building agents with wallets and the Bazaar catalog for finding x402 services. You don't need a Coinbase account to pay an x402 API; a seller using the CDP facilitator does need CDP API keys.
See the API Read Any Web Page, PDF or Doc — clean Markdown for AI agents · $0.02 / call
The pieces, and who needs which
| Piece | What it does | Who uses it |
|---|---|---|
| x402 specification | Defines the 402 answer, the payment headers and the payment schemes | Anyone building a client or server |
| Open-source libraries | Client wrappers that pay automatically, server middleware that asks for payment | Developers on both sides |
| CDP facilitator | Checks a signed payment and submits it on-chain | Sellers; buyers never call it directly |
| AgentKit | A toolkit for agents with their own wallet, with plugins for actions | People building agents |
| Bazaar | A discovery catalog of x402 services | Agents looking for paid APIs |
What the facilitator does for a seller
On Base mainnet, our server uses the CDP facilitator, authenticated with CDP API keys. For testing, the public facilitator at x402.org works on Base Sepolia with test USDC, no keys needed.
- Your server gets a request with a PAYMENT-SIGNATURE header.
- It checks the fields itself first (amount, token, network, receiver), then sends the payload to the facilitator's verify endpoint.
- If the payment is valid, your server does the work.
- Your server calls settle; the facilitator submits the transfer and returns the transaction id, which goes back to the buyer in PAYMENT-RESPONSE.
Paying with AgentKit
If your agent is built with AgentKit, the iamai-agentkit npm plugin adds actions for our marketplace and our 8 APIs, and payment happens through the agent's wallet. Without AgentKit, any x402 v2 client works. Either way, the wallet needs USDC on Base.
npm install iamai-agentkit
# Then call any of our APIs, e.g. read a page as Markdown ($0.02):
POST https://iamai.markets/api/x402/services/XyehnOmhOzAF
{"url": "https://example.com/article"}
Common misunderstandings
- x402 isn't a Coinbase-only product. It's an open standard; other facilitators and clients exist.
- Buyers don't need a Coinbase account. A wallet with the right token is enough.
- The buyer doesn't pay gas in ETH for the "exact" scheme on Base. They sign; the facilitator submits.
- A 402 isn't an error to retry blindly. It's the price; the client should check it against its own limits before paying.
The product
Questions
Do I need Coinbase to sell an x402 API?
No, but you need a facilitator that supports your network, or your own settlement code. Selling through iamai.markets, we handle the x402 side for you.
Is there a test network?
Yes. Base Sepolia with test USDC and the public x402.org facilitator.
Is AgentKit required?
No. It's one option. Any x402 v2 client can pay our APIs.
Related
Updated 2026-12-01
