Built around the HTTP 402 status code, x402 enables users to pay for resources via API without registration, emails, OAuth, or complex signatures.
x402 as a protocol has 0 fees for either the customer or the merchant.
Accept payments at the speed of the blockchain. Money in your wallet in 2 seconds, not T+2.
As little as 1 line of middleware code or configuration in your existing web server stack and you can start accepting payments. Customers and agents aren't required to create an account or provide any personal information.
Anyone can implement or extend x402. It's not tied to any centralized provider, and encourages broad community participation.
Activates the dormant 402 HTTP status code and works with any HTTP stack. It works simply via headers and status codes on your existing HTTP server.
x402 is not tied to any specific blockchain, its a neutral standard open to integration by all.
x402 unlocks new monetization models, offering developers and content creators a frictionless way to earn revenue from small transactions without forcing subscriptions or showing ads.
Agents can use the x402 Protocol to pay for API requests in real-time.
Using x402, customers can easily access storage services without account creation.
x402 unlocks instant transactions, enabling true micropayments for content.
Just add a single line of code in your app, and you can require a USDC payment for each incoming request.
app.use("/your-route", paymentMiddleware("$0.10", myAddress)); // and thats it!
If a request arrives without payment, the server responds with HTTP 402, prompting the client to pay and retry.
HTTP/1.1 402 Payment Required
x402 allows any web developer to accept crypto payments without the complexity of having to interact with the blockchain.