What is x402?
x402 is an open pattern for paying for HTTP resources in a standard way: servers can respond with 402 Payment Required, include machine-readable payment instructions, and clients (browsers, agents, backends) can complete payment and retry the request.
The problem it solves
Section titled “The problem it solves”Traditional APIs use accounts, API keys, or OAuth. That works for humans with dashboards, but it is awkward for:
- Autonomous agents that need to pay per call without a billing portal.
- Micropayments where card fees and subscription churn dominate.
- Cross-org access where you want payment to be the gate, not a shared identity system.
x402 turns payment into part of the HTTP contract: if you don’t pay, you get a 402 with how to pay; if you do, you get the resource.
What “402” means here
Section titled “What “402” means here”HTTP defines 402 Payment Required as a reserved status. For years it was rarely used in practice. x402 activates it: a client that understands the flow knows that a second request may succeed after payment (often with a payment proof in a header).
So at a high level:
- GET/POST … →
402+ payment requirements (who to pay, how much, which asset/chain). - Client builds authorization (e.g. EIP-712 + EIP-3009 style flows on EVM—exact details depend on facilitator and network).
- Client retries with a
payment-signature(or equivalent) header. - Server verifies and settles via a facilitator (or your own verifier), then returns
200with the resource.
Facilitators
Section titled “Facilitators”Most teams don’t want to run full chain indexing and settlement in their API process. A facilitator service verifies signatures on-chain (or per its model) and completes settlement. Your app forwards proofs to the facilitator’s HTTP API; you stay responsible for pricing, routes, and when to return 402.
You remain facilitator-agnostic at the protocol level: swap facilitator URLs as long as your client and server agree on the payload shape you use.
Relationship to TallyPay
Section titled “Relationship to TallyPay”x402 is the protocol story (402, headers, retry). TallyPay adds optional lifecycle tracing (server + client events) so you can see where people drop off—402 issued vs signed vs settled—without replacing your facilitator or wallet stack.
Next: How the protocol works.