ambolt

Learn / updated 2026-10-03

What is x402? HTTP 402 payments for APIs and AI agents

x402 is an open protocol that uses the HTTP status code 402 Payment Required to let a client pay for a single API call. There is no sign-up, no subscription and no API key: the server answers with a price, the client pays, and the server delivers the result.

How a call works

  1. The client sends a normal request, for example GET /v1/iban-validate?iban=….
  2. Without payment, the server answers 402 and describes what it accepts: the amount, the asset (USDC), the network and the receiving address.
  3. The client signs a payment for exactly that amount and sends the request again with the payment attached.
  4. The server checks the payment, runs the call and returns the result.

On networks such as Base and Polygon the client signs an authorisation and a payment service (a facilitator) submits it, so the client does not need a gas token. Solana is supported as well.

Why it matters for AI agents

An agent that needs one answer once does not want to open an account, store a key and pick a plan. With x402 the price is part of the response, so the agent can decide to pay, compare prices or skip the call. For data providers it means no billing system: a call is paid when it is made.

What to look for as a buyer

Frequently asked questions

Is x402 a cryptocurrency? No. It is a protocol. Payments are made in a stablecoin such as USDC, but the protocol itself only defines how the price and the payment travel over HTTP.

Do I need a wallet? To pay, yes: the client signs a payment from a wallet that holds a little USDC. To look at prices and try a call, no.

Which libraries support it? Client libraries exist for JavaScript and Python; the Ambolt SDKs work with any x402-capable fetch.

See how it looks in practice in how an agent pays per call, or try an IBAN check for free.

Related

Informational only, not financial, legal or tax advice.