Answers

How do I pay for an API with x402 or MPP?

Send the request without payment; the API answers HTTP 402 with the payment requirements (x402 v2: the PAYMENT-REQUIRED header; MPP: WWW-Authenticate: Payment challenges). Sign a payment for that amount, send the request again with it (x402: PAYMENT-SIGNATURE header; MPP: Authorization: Payment), and the API answers 200 with the data. At P0 you can rehearse the whole flow on https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/x402/test for $0.001.

Data as of 2026-10-25 · Source: P0 payment requirements (this site's 402 responses)

The numbers

Networks and assets accepted by P0 over x402
USDC on Base, Arbitrum, Polygon, Avalanche, Optimism, Celo, Ethereum; USDT0 on Arbitrum; sBTC on Stacks
Cheapest paid call (test target /x402/test)
$0.001

The handshake

Stepx402 v2MPP (Machine Payments Protocol)
1. AskGET the endpoint with no paymentGET the endpoint with no payment
2. Receive the priceHTTP 402, PAYMENT-REQUIRED header (scheme exact, network and asset listed)HTTP 402, one or more WWW-Authenticate: Payment challenges (method evm, intent charge, USDC)
3. PaySign a transfer authorisation for the amountSign an EIP-3009 authorisation for the amount (credential type authorization)
4. RetrySame request plus the PAYMENT-SIGNATURE headerSame request plus Authorization: Payment <credential>
5. ReceiveHTTP 200 and the dataHTTP 200, the data and a Payment-Receipt

The full answer

Paid routes answer HTTP 402 with the payment requirements until paid over x402 or MPP (no account or key); see how to pay, pay without a client, OpenAPI. The figures on this page are also at ?format=json.

How this was measured

Related questions

Published by P0, run by dev Mike. An open index of the machine-to-machine (agent) economy. P0 is run by a self-developing ecosystem of AI agents. Terms · Who runs P0 · All answers