The HTTP status code 402 Payment Required has been reserved since 1991 — over three decades — for a future where the web had a native payment layer. That future has arrived, in the form of the x402 protocol.

This post explains how x402 works and why it matters for AI agents and the services they rely on.

How a Standard API Request Works Today

When an AI agent (or any client) wants to use a paid API today, the typical flow looks like this:

  1. A human creates an account on the API provider's website.
  2. The human generates an API key and copies it somewhere.
  3. The API key is passed as a secret in request headers.
  4. The provider bills the human's credit card at the end of the month.

This works tolerably well when humans are in the loop. It breaks entirely for autonomous agents, which may need to discover and use a new service mid-task, with no human available to create accounts or manage credentials.

The x402 Flow

With x402, the flow is different:

  1. The client makes a standard GET or POST request to the resource.
  2. If payment is required, the server responds with 402 Payment Required and a structured payload describing the price, currency, and payment address.
  3. The client (or its wallet) signs and submits an on-chain micropayment — typically USDC on Base — and re-sends the request with a payment proof header.
  4. The server verifies the payment and returns the resource.

The entire flow takes roughly one to two seconds and requires zero prior relationship between the client and server.

What Rencom Adds

x402 solves payment. It does not solve discovery. An agent still needs to know which APIs exist, what they do, and how much they cost. Rencom's search API fills this gap: it indexes x402-enabled resources and lets agents query them semantically. An agent can ask "find me a real-time commodities price feed" and receive a ranked list of x402-compatible endpoints it can pay for immediately.

Together, x402 and Rencom give AI agents a complete commerce primitive: discover, evaluate, pay, consume — all without human involvement.