Whitepaper · v0.1 · August 2026
MeshGateway: a payment gateway for machines
Non-custodial, per-request stablecoin payments for APIs and digital goods, built on the Machine Payments Protocol and HTTP 402.
Abstract
Autonomous agents are becoming the dominant consumers of APIs, yet the web still bills them like humans: accounts, API keys, cards, and monthly invoices. MeshGateway turns any HTTP endpoint or file into a machine-payable merchant. Buyers pay per request with signed stablecoin authorizations over HTTP 402; funds settle directly to the merchant's wallet on Base or Robinhood Chain. The gateway verifies and forwards payments but can never hold or redirect them.
1The problem
Machine-to-machine commerce is blocked by three human-shaped assumptions. First, identity: API keys and OAuth presume a signup flow an agent cannot complete on its own. Second, billing granularity: subscriptions and monthly invoices make no sense for an agent that needs exactly one quote, one file, or one inference. Third, custody: traditional payment processors sit between buyer and seller, holding funds, taking days to settle, and excluding anyone without a merchant account.
What agents need is the payment equivalent of an HTTP request: stateless, instant, priced per call, and requiring nothing but a wallet.
2Protocol: MPP over HTTP 402
MeshGateway merchants speak the Machine Payments Protocol (MPP), an open standard for machine payments layered on the reserved HTTP status code 402 Payment Required. It is compatible with x402 clients. A payment is a four-step exchange:
1. GET /m/acme/v1/quote
2. ← 402 Payment Required
WWW-Authenticate: Payment id="…", method="evm", intent="charge"
3. GET /m/acme/v1/quote
Authorization: Payment <signed EIP-3009 authorization>
4. ← 200 OK
Payment-Receipt: <signed receipt>The challenge names the price, currency contract, network, and recipient. The buyer signs an EIP-3009 transfer authorization for the exact amount, made out to the merchant's wallet, and retries. The gateway verifies the signature, settles on-chain, fulfills the request, and attaches a signed receipt. No account, no key, no session.
3Architecture
MeshGateway is a reverse proxy with a payment layer. A merchant registers an upstream URL (or uploads a file), sets a price, and pastes a payout wallet. The gateway then exposes the merchant at /m/{slug}/… and enforces the 402 challenge in front of every paid route.
Three components do the work: the challenger, which issues signed, replay-proof payment challenges; the verifier, which checks authorizations against the challenge and submits them on-chain; and the proxy, which forwards the request upstream only after settlement is confirmed and never leaks the upstream origin or credentials to the buyer.
4Non-custodial settlement
Every payment is a stablecoin transfer authorization made out directly to the merchant's address. MeshGateway is named in no transfer and holds no balance: it cannot redirect, freeze, or delay funds, and a gateway compromise cannot move money. On Robinhood Chain the one-time Permit2 approval is gas-sponsored and settlement gas is paid by the MeshGateway relayer, so buyer wallets need only the stablecoin itself.
5Discovery
Every merchant publishes a machine-readable /m/{slug}/openapi.json: an OpenAPI 3.1 document where each paid route carries x-payment-info.offers[] entries listing amount, currency contract, network, and recipient. Agents can price a call before making it, and the marketplace aggregates all merchants into a single crawlable index.
6Networks
MeshGateway settles in USDC on Base and USDG on Robinhood Chain, and the protocol is network-agnostic: any EVM chain with an EIP-3009 stablecoin can be added as a settlement target. The first mainnet MPP payment settled in USDG on Robinhood Chain in 2026.
7The $MESH token
$MESH is the planned network token of MeshGateway, designed to align merchants, relayers, and the protocol: fee discounts for merchants, staking for relayer operators, and governance over protocol parameters. Design details and distribution are covered on the $MESH page and remain subject to change before launch.
8Conclusion
The web has had a payment status code since 1997; what it lacked was money that machines could move. Stablecoins and signed transfer authorizations supply it. MeshGateway connects the two so that any endpoint can charge, any agent can pay, and no intermediary ever custodies the funds.