x402
x402 is an open standard that lets AI agents pay autonomously.
By Team MoonPay
Published on Aug 14, 2026
Last modified on Aug 14, 2026

x402 is an open standard that lets AI agents pay autonomously.
Software is starting to pay other software directly: one program requesting data, API access, or a paid resource from another, with no person involved at all. x402 is an open standard built to let that happen, using a crypto wallet in place of a credit card.

It allows web services, APIs, and AI agents to settle payments instantly with stablecoins using a single request.
How it works

- An agent requests something that costs money, like a product, a dataset, or an API call
- The server replies with a 402 status code and the payment details
- The agent's wallet signs the payment and sends it back with the request
- The payment gets verified and settled onchain
- The server delivers the resource
Why the name "402"

The mechanism repurposes a piece of the web that's existed since 1991 but never had a job. HTTP 402 was set aside for "Payment Required," the same family as the 404 code used for "page not found," but for over 30 years nothing defined what was supposed to happen once that code appeared.
x402 fills in that gap: it specifies exactly what a server includes when it asks for payment, and exactly what an agent must send back to complete it.
The bigger picture
Because x402 is an open standard, any website, wallet, or service can implement it without a license or a gatekeeper controlling access. It’s part of a broader shift toward letting AI agents handle payments on their own, from everyday purchases to machine-to-machine transactions.

For weekly quick reads on crypto topics, subscribe to the MoonPay Minute.