Skip to content

Paying with MPP

github-actions[bot] edited this page Aug 18, 2026 · 4 revisions

Paying with MPP

MPP (Machine Payments Protocol) is the open, IETF-track HTTP payment scheme co-authored by Tempo and Stripe: the server answers 402 with WWW-Authenticate: Payment, the client replies with Authorization: Payment, and a settled response carries a signed Payment-Receipt. Spec and tooling: tempoxyz/mpp · mpp.dev · client/server library mppx.

Every paid endpoint on Agent402.Tools is dual-stack: the same 402 carries an x402 offer and an MPP challenge. Same URL, same price - the buyer's client picks the wire. MPP is one of the two wires underneath Agentic Finance, agents that pay and get paid on their own; Agent402 is its applied layer.

What settles, where

MPP method Asset Where it settles Notes
evm charge USDC Base, Celo Same EIP-3009 on-chain settlement as x402, translated by the shim; verifiable on Basescan/Celoscan
tempo charge PathUSD Tempo (chain 4217) Native TIP-20 settlement through Tempo's hosted MPP relay, no x402 facilitator involved

The MPP marketplace lists other MPP sellers we can verify live and ranks them on the MPP leaderboard: inbound USDC.e transfers on Tempo to the recipient each seller's live challenge names, read from the chain by us over the most recent window (transfers, distinct payers, volume; rows at or above the router's floor are marked routable). Machine-readable at /api/mpp-index and /api/mpp-leaderboard. The revenue page shows every MPP-wire settlement per rail with explorer links.

JavaScript (mppx)

import { Mppx, tempo, evm } from "mppx/client";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_KEY);
// Offer both methods; the client picks the one the 402 advertises that it can pay.
const client = Mppx.create({ methods: [tempo.charge({ account }), evm.charge({ account })] });

const res = await client.fetch("https://agent402.tools/api/uuid");
console.log(res.status, res.headers.get("payment-receipt"));
console.log(await res.json());

For evm you need USDC on Base or Celo in the paying wallet; for tempo you need PathUSD on Tempo mainnet. No API key, no signup: the wallet is the account.

Verifying a settlement

  • evm: the Payment-Receipt reference is the on-chain tx hash on Base or Celo.
  • tempo: the reference is the Tempo tx hash, viewable at https://explore.tempo.xyz/tx/<hash>.
  • Aggregate, machine-readable: /api/revenue/mpp (counts, per-rail hashes, no buyer data).

Accepting MPP on your own API

If you already speak x402, MPP can be added without touching settlement: emit an additional WWW-Authenticate: Payment challenge derived from your existing offer, and re-encode inbound Authorization: Payment credentials into your existing verification path. Agent402's implementation is open source in this repository (src/mpp-shim.js for the evm translation, src/mpp-tempo.js for native Tempo). Set MPP_SECRET_KEY to enable the shim on your own instance and TEMPO_API_KEY (plus a recipient) to offer native Tempo.

Related

Clone this wiki locally