BETA
English
+ Add a service

What is x402? A quick guide for Latin American devs

CadaUso Team ·

Short answer: x402 is an open standard that uses the HTTP 402 Payment Required status to charge for each API call. The server answers 402 with the price, the client (often an AI agent) pays, usually in USDC, and repeats the call with proof of payment. No account, no monthly plan and no API key.

A status code that waited decades

The 402 code has been in the HTTP specification since the nineties, but it was left "reserved for future use": nobody defined how a payment should work inside a web request. For years browsers and servers mostly ignored it (MDN describes it this way).

x402 gives it a job. The idea is simple: if a resource costs money, the server says so in the same HTTP response and the client can pay without leaving the flow. The specification and docs live at x402.org and docs.x402.org.

How it works, step by step

  1. Your client calls the API as usual: a GET or POST to a URL.
  2. The server answers 402. Instead of the data, it sends back the payment requirements: how much, in which token, on which network and to which address.
  3. The client pays. It signs a payment for that exact amount. In practice, most services ask for USDC on a network such as Base.
  4. The client repeats the call and includes the proof of payment in a header.
  5. The server verifies and responds. Many implementations use a facilitator, a service that verifies and settles the payment so the provider doesn't have to do it all alone. If the payment is valid, the data arrives.

It all happens in seconds and inside HTTP. That is why it fits AI agents so well: an agent can't fill in a sign-up form or wait for a confirmation email, but it can read a 402, pay and retry.

Why it matters in Latin America

Many useful APIs for the region, such as CNPJ lookups in Brazil, CLABE validation in Mexico or exchange rates, are usually sold with monthly plans, contracts or sign-up first. For an agent that needs a single lookup, that is too much.

With x402, the provider can charge per call and the client pays only for what it uses. Some examples listed on CadaUso today:

Each provider runs its own API and sets its own price. CadaUso only lists and links: it doesn't handle payments or hold funds.

How to try an x402 endpoint without paying anything

You don't need a wallet to see how an x402 service responds. Make a normal call and look at the response:

curl -i "https://SERVICE-URL"

If the service uses x402, you'll see HTTP/1.1 402 Payment Required and the payment requirements (price, token, network). That 402 is the "invoice". Nothing is charged until your client signs and sends the payment.

To pay for real, use the SDKs and examples in the official documentation, and start with small amounts or on a test network.

x402 doesn't replace Pix or SPEI

This is a common mix-up. Pix (Brazil) and SPEI (Mexico) are central-bank payment systems that move reais and pesos between accounts, usually with a person confirming in their bank app. x402 is an HTTP pattern designed for a machine to pay for a resource. They do different jobs. We explain it with a table and sources in x402, Pix and SPEI.

FAQ

Do I need an API key to use an x402 service? Not for the payment. The payment itself replaces sign-up. Some providers may ask for extra details; check each listing and its documentation.

What currency do I pay in? Most x402 services ask for USDC on a specific network. Each service's 402 says exactly what it accepts.

Is x402 only for AI agents? No. Any HTTP client can use it: a script, a backend or an agent. Agents are the most natural case because they can't sign up on a website.

Is this financial advice? No. This is an educational guide. Check the rules in your country before working with digital assets.

Next step

CadaUso is in Beta. This text was drafted with AI help and reviewed by the team.

Sources

← All articles