Skip to main content
The Machine Payments Protocol (MPP) is an open standard for HTTP-native payments — it gives meaning to the HTTP 402 Payment Required status code so that agents, apps, and services can pay each other for API access in a single request, with no accounts, invoices, or checkout flows. On Celo, MPP lets any service charge USDC per request. The buyer pays no gas — settlement is handled on-chain by a hosted facilitator.

How it works

A request with no payment gets a 402 carrying an MPP Challenge. The buyer signs a Credential and retries; the server settles the payment on Celo and returns a Receipt with the on-chain transaction. USDC moves buyer → seller directly inside the token contract. The facilitator submits the transaction and pays the gas; it never custodies funds.

Prerequisites

Settlement runs through a hosted facilitator that charges a small credit per transaction. Get an API key (a human does this once):
  1. Open x402.celo.org and connect an EVM wallet.
  2. Click Create API key and sign the message (no gas, no transaction).
  3. Copy the key (shown once) — it looks like x402_....
  4. Set it as X402_API_KEY in your project.
New accounts start with free testnet and mainnet credits. Develop on Celo Sepolia first.

Build with MPP

Install the mppx SDK.

Seller — charge for your API

Configure MPP with one payment method — a one-time EVM charge on Celo — and settle through the Celo facilitator. Passing the known asset (assets.celoSepolia.USDC) lets mppx infer the chain id, decimals, and EIP-712 domain for you.

Buyer — pay automatically

The mppx client patches fetch to answer MPP challenges automatically. The buyer needs a wallet funded with USDC and no native gas.
On the buyer side you must supply the token decimals and its EIP-712 authorization ({ name, version }) — the client builds the payment credential locally and does not read these from the server’s challenge. For Celo USDC the domain is name: "USDC", version: "2".

Example project

A complete, runnable seller + buyer you can clone and run in minutes — verified end-to-end on Celo testnet and mainnet:

celo-org/mpp-celo-example

Minimal MPP example on Celo — a paid API and a client that pays it.

Supported assets on Celo

Both are 6-decimal and support gasless EIP-3009 transfers.

Resources