x402 vs MPP: use both
Use both. A paid route on this server answers one 402 that carries an x402
offer and MPP challenges side by side, and your client pays whichever it
speaks: the same price, the same answer, the same settlement rule. A client whose User-Agent starts with python-httpx/ gets the x402 offer alone, with no WWW-Authenticate: Payment challenge, unless it sends X-Payment-Offers: mpp or an Accept-Payment header naming an MPP method.
The two protocols in one line each
- x402 puts the terms in a
PAYMENT-REQUIREDheader (anacceptslist: scheme, network, asset, amount, payTo), and the client retries with a signedPAYMENT-SIGNATURE. On EVM chains the payment is a signed USDC transfer authorization the facilitator settles. - MPP, the Machine Payments Protocol, is a
PaymentHTTP authentication scheme: aWWW-Authenticate: Paymentchallenge, anAuthorization: Paymentcredential on retry, and aPayment-Receiptheader back.
What is the same either way
- The price. Both offers name the same amount for the same call.
- The settlement rule. On this server the MPP
evmmethod is translated into the x402 path, so one component settles every EVM payment: the same replay guard, the same payer, the same idempotency. - The settle-after rule. An x402 payment settles only after a successful answer, so an x402 call that answers an error is not charged. Some calls are paid before they run; a failed one can be retried free with the same payment, or is refunded.
Where they differ
| x402 | MPP | |
|---|---|---|
| Challenge | PAYMENT-REQUIRED header and body |
WWW-Authenticate: Payment, one per method |
| Retry | PAYMENT-SIGNATURE |
Authorization: Payment |
| Receipt header | PAYMENT-RESPONSE |
Payment-Receipt |
| Chains here | USDC or USDG on fourteen chains | the evm method on the EVM rails (Base and Celo on this instance; /.well-known/x402 lists them), and tempo where the 402 names it |
When the choice matters
- Your client already speaks one. Use it; the other offer is ignored.
- You want a chain only one of them covers here. The table above says
which;
/.well-known/x402lists the live rails. - You sell. Offer both and no buyer has to switch clients: agent402-tollbooth and this server answer both on one 402.
The mechanics of how one paywall serves both: x402 and MPP on the same paywall.