BETA
English
+ Add a service

x402, Pix and SPEI: which to use and when?

CadaUso Team ·

Short answer: Pix (Brazil) and SPEI (Mexico) are payment systems run by their central banks to move local money between accounts, almost always with a person confirming. x402 is an HTTP standard that lets a program, such as an AI agent, pay an API per call, usually in USDC. They don't compete: each one does a different job.

Pix, in two paragraphs

Pix is the instant payment scheme of the Banco Central do Brasil. It moves reais (BRL) between accounts in real time, 24 hours a day, every day, and settlement between institutions runs through SPI, the BCB's infrastructure.

For the end user, a Pix usually starts in a bank or payment-institution app: scan a QR code or use a Pix key and confirm. That human confirmation is part of the design, and it is what makes Pix hard for an agent that has to pay on its own.

SPEI, in two paragraphs

SPEI is the Interbank Electronic Payment System run by the Banco de México. It handles peso (MXN) transfers between accounts at different banks, identified by an 18-digit CLABE.

As with Pix, a SPEI transfer is normally ordered from online banking or an app, with the account holder authenticating. Companies can automate collections and payouts through their bank or a payment provider, but always within a contract with that institution.

x402, in two paragraphs

x402 is an open standard (x402.org) that uses the HTTP 402 Payment Required status. The server answers 402 with the price; the client pays and repeats the call with proof of payment (documentation).

There is no bank account involved and no sign-up first. That makes it work for machine-to-machine micropayments: an agent that needs one lookup pays for that lookup and moves on. For the details, read What is x402?.

Comparison table

Pix SPEI x402
Defined by Banco Central do Brasil Banco de México Open standard (x402.org)
Currency Reais (BRL) Pesos (MXN) In practice, stablecoins such as USDC
How it starts Bank or payment-institution app Online banking or bank app HTTP 402 response
Who confirms Usually a person Usually a person The client itself (program or agent)
Built for Payments between people and shops Interbank transfers Paying per API call

When to use each one

Use Pix or SPEI when you charge people or businesses in local currency: sales, invoices, payroll, supplier payments. These are the rails your customers already use every day.

Use x402 when the payer is software. For example, an agent that needs to check a CNPJ, validate a CLABE or look up an exchange rate once, without opening an account with each provider.

And often, both. An agent can use x402 to pay for an API that validates Pix or SPEI data, without moving any reais or pesos. CadaUso lists examples:

We also list MCP servers for connecting to payment providers, such as Mercado Pago (CodeSpar MCP). In those cases, payment confirmation happens on the provider's site.

What CadaUso does (and doesn't do)

CadaUso is a directory: it lists and links. Each provider runs its own API and sets its prices. We never receive or move Pix or SPEI funds.

FAQ

Does x402 replace Pix or SPEI? No. They are different rails for different jobs.

Can an AI agent pay with Pix on its own? In general, a Pix needs a person to confirm in an app. Pay-per-call flows with no human in the loop are the case x402 exists for.

Is there a public Banxico SPEI API? Banxico publishes information about SPEI and how it operates on its website. Transfers are normally started through a participating bank or provider. See the official page.

Is this financial advice? No. It is an educational guide with sources. Check the rules in your country.

Next step

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

Sources

← All articles