Download Trust Wallet
Home  >  Glossary  >  x402

x402

Share post
In Brief

x402 is an open payment protocol built on the HTTP 402 "Payment Required" status code that lets websites and APIs charge crypto — typically stablecoins — per request, so humans and AI agents can pay for resources instantly.

x402

What Is x402?

x402 is an open payment protocol built on HTTP status code 402, "Payment Required," which was reserved in the web's original design but never standardized. x402 puts it to work: a server responds to a request with payment terms, the client pays in crypto — typically stablecoins — and retries, receiving the resource moments later.

The protocol is aimed squarely at machine-to-machine commerce. AI agents, scripts, and apps can pay per request — per API call, per article, per inference — without accounts, API keys, subscriptions, or card checkouts, because the payment travels inside the HTTP exchange itself.

How an x402 Payment Works

  1. A client requests a paid resource; the server replies with a 402 status and machine-readable payment terms — asset, amount, network, and address.

  2. The client — a human's wallet or an AI agent — signs a payment authorization for the stated amount.

  3. It retries the request with the signed payment attached in a header.

  4. The server (or a facilitator service) verifies and settles the payment on-chain, then returns the resource.

Why x402 Matters

x402 and Trust Wallet

Trust Wallet doesn't process x402 payments itself; it's the self-custody home where users hold the stablecoins and keys that protocols like x402 build on. If agent-driven payments become part of everyday crypto, the foundation stays the same: your keys, your authorization, your funds.

Simple and convenient
to use, seamless to explore

Download Trust Wallet