What Is X402?
· updated · 2 min read
X402 is an HTTP extension that lets APIs ask for payment directly in their responses. An API returns a 402 status code with a price quote and wallet address. The client pays the amount and repeats the request with proof of payment to get the data. This method removes the need for user accounts, API keys, or invoices.
How it works: a short explanation with one concrete example
The process follows a simple loop between the buyer and the seller. First, an AI agent sends a request to an API endpoint. If the service requires payment, the API responds with a 402 status code. This response includes a quote that specifies the price, the cryptocurrency network (such as Base or Solana), the token type, and the payout wallet address.
The client uses this information to send a payment to the specified wallet. The client then repeats the original request. This time, it includes proof of payment in the headers. The API verifies the proof and returns the requested data.
For example, imagine an AI agent needs to translate text. It asks a translation API for help. The API replies with a 402 code asking for a small amount of USDC on Solana. The agent sends the crypto to the provided wallet address. It then calls the API again with proof that the payment was made. The API checks the proof and returns the translated text.
Why it matters: 2 or 3 sentences for the reader
This standard enables machine-to-machine commerce without human intervention. Developers can build AI agents that autonomously purchase data or compute power on demand. For sellers, it simplifies monetization by removing the friction of account creation and billing cycles. However, because payments happen instantly and anonymously, trust becomes critical. Buyers need assurance that the endpoint is legitimate and will deliver the promised service after payment.
Related terms
- 402 Payment Required: An HTTP status code defined in web standards that indicates payment is needed to access the resource.
- x402 Bazaar: A directory where developers list their X402 endpoints so others can discover and pay for them.
- Proof of Payment: Cryptographic evidence that confirms funds have been sent to the correct wallet.
- Payout Wallet: The public blockchain address where the seller receives payments for their API services.
Lumière PayCheck helps agents verify these endpoints before they pay by checking the quote validity and monitoring the payout wallet for stability. You can check any x402 endpoint yourself at https://lumierepaycheck.org/check.
Related reading
More from the blog
The highest-graded x402 APIs for web search and scraping
Updated November 21, 2026 from PayCheck's live grades. These are the x402 endpoints for web search and scraping that Lumière PayCheck grades highest right…
How to Stop an AI Agent from Paying a Scam API
To stop an AI agent from paying a scam API, check the seller before every payment and cap what the agent can spend. Lumière PayCheck does the seller check…
The highest-graded x402 APIs for weather and earth data
Updated November 20, 2026 from PayCheck's live grades. These are the x402 endpoints for weather and earth data that Lumière PayCheck grades highest right…