Today, @coinbasedev is announcing x402: an open standard/protocol to bring onchain payments to the web. Join us in killing the API key, and making the agentic and payable web a reality. All in one line of code. Imagine a future where crypto is the default to pay for *anything*.
Cast image embed
Nemil Dalal avatar
It all starts with HTTP status code 402, payment required. Set aside for payments, it was never implemented. For years, the crypto community has talked about bringing blockchain payments to the web. We think the moment is now.
1
12
Nemil Dalal avatar
Blockchains are finally fast, scaled, and cheap. Stablecoins bring stability and easy global adoption. Usability has improved a ton. Hundreds of millions are onchain. Just as importantly, there's a critical use case for machine to machine payments: AI.
1
4
Nemil Dalal avatar
Thousands of developers have used AgentKit, pairing an AI agent with a crypto wallet. But it's impossible for an AI agent to pay. And many agent use cases are commerce based. AIs don't have credit cards. API keys are made for humans. Enter 402.
1
4
Nemil Dalal avatar
With x402, agentic commerce is suddenly a reality. Your API can accept crypto, your paywall can accept crypto, your MCP server can accept crypto. Blockchains are global, permissionsless, and programmable, the exact characteristics that make them perfect for machines.
1
4
Nemil Dalal avatar
The same technology can be used for micropayments, paywalls, and more. No fees, instantaneous settlement, no transaction minimums. If you develop a website, check out our instructions:
Quickstart for Sellers | x402
x402.gitbook.io
Quickstart for Sellers | x402
1
5
Nemil Dalal avatar
In JS, it's one line of code: app.use("/your-route", payMiddleware("$0.10", myAddress)); How it works: - Client requests something - Client gets a 402 response - Client responds with a signed payment - (Server does work and broadcasts transaction) - Client gets response
Cast image embed
1
1
9
Nemil Dalal avatar
This is just the start. We're going to keep building this standard in the open. Join us.
x402.org
x402.org
x402.org
8
Robotandkid  avatar
killing the api? can you redo that press release with buzzwords
1
1
Nemil Dalal avatar
Killing the *api key*. AI agents don't have credit cards. They can't go through a human focused API key signup process. But they need access to paid data and money.
1
1
Robotandkid  avatar
that's just more buzz words. under the hoods agents use API keys. pretend im a boomer engineer. try explaining it that way
ted (not lasso) avatar
congratulations!! this is exciting, and love seeing all of the partners included.
1
2
24
zhtyji avatar
cool
Stuphs avatar
I love seeing real steps toward seamless crypto payments.
2
Bernardo avatar
Very good news for everyone in crypto
2
Joshua Salles avatar
oOoOoOo 👀
2
Rafi avatar
This opens up so many possibilities. Thank you for making it happen!
2
mleejr avatar
this looks pretty badass nice work
2
Jon Commstark avatar
Very cool
2
Shaya avatar
Hey friend, congrats!
1
osama avatar
how does this work with www.w3.org/TR/payment-r... ?
Payment Request API
w3.org
Payment Request API
2
4
Erik.eth avatar
They’re unrelated. That standard focuses on merchant payments for e-commerce. X402 is lower level, arbitrary payments over http
1
4
Nemil Dalal avatar
@osama hope that helps. The world is changing pretty dramatically with AI agents.
2
1
osama avatar
happy to dm. i care about internet standards. crypto eng have tendency to gloss over details and hype. then disappear. there's a path here. this too shallow and non-technical vc types are hyping to mark up books
2
1
Erik.eth avatar
Happy to chat in dms or at the eth Vancouver meetup. Agree on hype which is why x402 works live in production today
2
moonowl.eth avatar
Playing hardball with stripe. One line of code is amazing.
1
Darryl Yeo 🛠️ avatar
Okay, redefining the 402 HTTP response code is GENIUS 🤯
402 Payment Required - HTTP | MDN
developer.mozilla.org
402 Payment Required - HTTP | MDN
1
4
Quazia avatar
Yeah it's a really clever use of the existing code - it works super smooth too.
1