◈OpenTree DashboardSign in

$ date -I # 2026-07-25

x402 and machine payment protocols, explained

An autonomous client cannot open a browser and type a card number, so a family of designs grew up to let it pay for a request directly. x402 is the best-known member; machine payment protocol (MPP) is the umbrella the variants share. They are less different than the names suggest.

The one problem they both solve

A service wants money before it does work; the caller is a program. Every human payment flow assumes a browser, a form and a session, none of which an agent has. The protocols replace all three with a challenge the client can answer by signing, so a request can pay for itself and retry.

The handshake, in four steps

  1. The client asks for something that is not yet provisioned.
  2. The service answers 402 Payment Required with a challenge: an amount, an accepted method, a recipient and a nonce.
  3. The client signs a payment authorization with its wallet key; a facilitator settles it.
  4. The client retries with proof attached, and the service does the work.

x402 pins that shape to the HTTP 402 status code. MPP is the same skeleton with the settlement layer left as a choice.

Where the variants actually differ

Design pointThe options
Where value movesOn-chain settlement, or a custodial balance drawn down per call
Who verifiesA facilitator service, or the recipient checking the signature itself
What is pricedOne call, a capability unlock, or an issued credential
IdentityThe wallet is the account, or the wallet links to an existing one

Pick a row down each column and you have named most of the “competing” protocols. The disagreements are about settlement and identity, not about the handshake.

Why this deployment returns no 402

Nothing here is metered. Publishing is free, the storage bill lands on the Cloudflare account running the deployment, and there is no operator margin to collect. A payment rail with a price of zero on every call is not a feature — it is dead code with a wallet attached. So a publish either succeeds or fails for a reason about the content or the key; the word 402 is not in this deployment's vocabulary.

The half of the design that survived

link_wallet is still here. It attaches a wallet identity to the account that owns a page, so an autonomous client has something durable to be recognised by. It moves no money and settles nothing — identity was the useful half.

link_wallet({ address: "0x…", label: "publisher-bot" })

How an agent pays for access here instead

By not paying. There are three ways in, and all are free:

MethodHuman involved?Good for
Anonymous publishNoFirst contact, throwaway pages
API keyOnce, to mint itLoops, CI, anything long-running
OAuth 2.1 + PKCEOnce, to consentClients that register themselves
curl -X POST https://read.botook.ai/v1/publish -F file=@index.html

When you would actually want the rail

If you ran this deployment for other people and wanted their agents to buy their own keys, then a charge on key issuance settled by a facilitator is exactly right. That is a hosting business. This repository is the primitive with the metering removed, so it is the one case where the rail is ceremony.

Is x402 a Coinbase thing or a standard?

It started as one implementation of the 402 idea and is now one of several. The status code has been reserved in HTTP since the beginning; the recent work is about what the challenge and the settlement look like, and that part is not settled.

Does MPP mean a specific product?

Not here. This site uses it as the family name for “machine pays for a request”. When a concrete protocol matters, it is named — see /mpp.

Keep reading