x402-mesh is now rail-agnostic: born on x402, rides everywhere

x402-mesh is now rail-agnostic and rides Stripe MPP, ACP and Google AP2 in addition to x402. It still turns a 402 Payment Required into a signed peer menu and pays the referrer a commission when the agent picks a competitor.

x402-mesh is now rail-agnostic: born on x402, rides everywhere
Contents(3)

Two days ago we landed c9a70d2: Make x402-mesh rail-agnostic: add Stripe MPP, ACP, AP2 (+ L402, card).

It sounds like a small README change. It's actually a protocol shift.

x402-mesh started as a fix for a very specific dead end: an AI agent hits a 402 Payment Required, sees one price from one vendor, and has no way to compare. We turned that dead end into a market by adding two backward-compatible primitives to the 402 body:

  • A peer menu: a signed list of competing offers in the same category
  • Settlement: if the agent picks a competitor, that competitor pays the referrer a commission

Vanilla x402 clients ignore it. Mesh-aware agents get a market.

But that problem isn't x402-specific. It's every agent payment rail that shipped in the last year.

The door is the problem, on every rail

  • Stripe MPP (Machine Payments Protocol, Stripe + Tempo, Mar 2026): metered per-call billing for APIs, stablecoin and fiat (cards, Klarna, Affirm) via Shared Payment Tokens
  • ACP (Agentic Commerce Protocol, OpenAI + Stripe): agent checkout, live in ChatGPT Instant Checkout
  • Google AP2 (Agent Payments Protocol, 60+ partners including PayPal, Mastercard, Amex, Adyen, Coinbase): the rail-agnostic authorization layer over cards, bank and stablecoin

Every one of them presented the agent with the same single-vendor door. So we made the mesh ride on all of them.

What changed in v0.1

The protocol core is untouched. Sections 2-7 of SPEC.md (the Ed25519 JWT referral token with iss, aud, exp, jti, cpct; discovery via /.well-known/x402-mesh.json; registry with public key mapping; identity composition; 5% default commission; 5-min TTL) are now explicitly rail-neutral.

A rail binding is just two functions:

  1. Where does the menu ride?
  2. And how does the commission split?

SPEC.md §8 now defines the official bindings:

RailMenu carrierCommission splitProof
x402 (Coinbase)mesh object in 402 bodyatomic MeshSplitter.sol on Basetx_hash
L402 (Lightning)mesh object in 402 bodypayout over Lightningpreimage
Stripe MPPmesh in payment-required / session responseStripe Connect application_fee on same chargecharge_id
ACPmesh attached to product feed / checkoutStripe Connect application_feecharge_id
Google AP2alternatives[] during Cart / Intent Mandate exchangecommission terms inside signed Payment Mandatemandate_id

The referral_token itself is unchanged across rails. On x402/L402 it travels in the follow-up request. On MPP/ACP it travels in the Shared Payment Token metadata. On AP2 it is referenced by the Payment Mandate.

That has two big consequences:

1. No escrow for fiat vendors

On x402, the reference adapter is still the non-custodial MeshSplitter.sol: agent pays contract, contract atomically forwards vendor share + referrer commission. No float, no trust.

On MPP and ACP, vendors skip the contract entirely. The commission is a native Stripe Connect application_fee. The /settle endpoint becomes optional for moving money. It's still used for the cross-vendor redemption ledger, which is the foundation for the open agent-reputation primitive.

Crypto-native onboarding is still one field: a Base wallet address. No Stripe account, no KYC.

2. Card-network agent programs just work

Visa Trusted Agent Protocol and Mastercard Agent Pay aren't separate bindings. They settle underneath AP2 or ACP, which already carry the mesh fields.

A vendor can support several rails at once by listing them in payout_rails in the registry. The menu advertises each peer's accepted rails, so the agent settles on one both sides share.

The name is historical

The name is historical. The protocol was first specified on x402 and still ships its reference adapter there, but it is not limited to it.

That's now in the README verbatim. x402-mesh is not "the x402 referral thing" anymore. It's the commerce layer that composes with whatever identity standard wins (Catena ACK-ID with DIDs + VCs, WIMSE / RFC 8693 Token Exchange actor-chain, WorkOS auth.md, A2A / AGNTCY) and settles the money on whatever rail the agent brought.

The full wire details are in SPEC.md §8, and the reference middleware is still npm x402-mesh.

MIT as always. Copy it, fork it, run your own registry.

© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.

Watch

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.

Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.