Role

Goals

  • Charge per request or per unit of usage with no sign-up, API key or invoice.
  • Get paid before or at the moment the response is served, with no chargeback exposure.
  • Serve humans and agents from one endpoint: 402 for payers, 200 for everyone who paid.
  • Keep fees low enough that sub-cent prices still make sense.
  • Be discoverable by agents through a bazaar, a directory or an OpenAPI extension.
  • Support metered sessions for streaming or long tasks without one settlement per chunk.

Pains

  • Facilitator fees and chain fees set a floor under the smallest viable price.
  • x402 and MPP both serve the pay-per-call case, and clients speak one or the other, so the seller supports both or loses traffic.
  • Reported transaction counts are inflated by leaderboard farming and memecoin activity, so real demand is hard to read.
  • A payment that settles after the resource was served can fail, and the seller has already given the data away.
  • Compliance is unclear: receiving stablecoins from unknown wallets raises sanctions screening and tax questions the seller cannot answer alone.
  • Clients retry with replayed or expired signatures, and each verify call to the facilitator costs time.

Decisions they own

  • Which protocols and rails to accept, and in which order to list them in accepts[].
  • Which payment flow to use: authorization (verify, serve, settle), upfront, or escrow.
  • Which facilitator to use, and whether to run one.
  • Price per request versus a session or subscription, and the deposit size for sessions.
  • Whether to require identity (Web Bot Auth, an ERC-8004 agentId) in addition to payment.

Vocabulary

  • 402
  • accepts
  • payTo
  • facilitator
  • settle
  • upto
  • session
  • voucher
  • metered
  • Payment-Receipt
  • bazaar
  • USDC
  • gas
  • fee floor

Each protocol from this seat

Relevance levels: High, a main persona on the protocol page; Medium, owns, implements or verifies a step; Low, relies on or observes a step; None, no role found in the protocol page.

ERC-8004: Trustless Agents

Relevance: High

Sells an API or agent service, registers it so buyers can find it, and receives payments at agentWallet. Source [1, 2, 3, 4]

Goals

  • Be found by agent buyers
  • Show a payment-backed track record
  • Keep the payee address safe

Pains

  • Competitors and spammers can rate it from fresh addresses
  • Responses do not change a low score
  • x402 payments look like ordinary transfers to indexers

Implements

  • x402Support true and an agentWallet bound by signature
  • appendResponse to answer complaints, for example with refund evidence
  • revenues feedback through its facilitator, as best practices suggest

Must trust

  • Readers to filter reviewers sensibly
  • The facilitator that publishes revenues feedback
  • The registry owner

Questions they ask

  • How do I get feedback from real customers counted?
  • What happens to my reputation if I sell the agent token?
  • Is my wallet binding replayable?

First three steps

  1. Register the service with x402Support true
  2. Bind a dedicated payment wallet
  3. Ask paying clients to include proofOfPayment

Metrics they care about

  • Feedback from paying clients
  • Revenue tracked by revenues feedback
  • Responses posted to complaints

A day in the life. Omar sells a pricing API to agents and already takes x402 payments. He registers it with x402Support true and binds a cold wallet as agentWallet. A week later a burst of zero scores arrives from addresses that never paid him. He cannot delete them, so he appends responses that link to his payment logs and asks his facilitator to publish revenues feedback, as the best-practices guide suggests. His larger buyers already pass a trusted reviewer list to getSummary, and the burst never shows up in their numbers.

Steps in the responsibility table

  • ImplementsWrite and host the registration file
  • ImplementsRegister the agent (register)
  • OwnsBind the payment wallet (setAgentWallet)
  • OwnsProve domain control (/.well-known)
  • Relies onPay the agent (outside ERC-8004)
  • Relies onWrite feedback with proofOfPayment
  • OwnsAppend responses to feedback

x402

Relevance: High

Runs the resource server: prices routes, answers 402, and asks a facilitator to verify and settle. Source [4, 5, 6, 7, 8, 9]

Goals

  • Charge per call without accounts or invoices
  • Get paid in the same request that serves the data
  • Keep chain work out of the API team's code

Pains

  • Picking a facilitator for production because the x402.org default serves testnets only
  • Handler work that is lost when a settle fails under the authorization flow
  • Timeouts on /settle that leave the outcome unknown

Implements

  • Payment middleware such as @x402/express with a route map of accepts entries
  • An x402ResourceServer wired to an HTTPFacilitatorClient
  • Reconciliation for settlement_pending results

Must trust

  • The facilitator to verify honestly and broadcast promptly
  • The asset contract to enforce the nonce and the window
  • Its own route matching (past releases fixed encoded-path bypasses)

Questions they ask

  • Which facilitator supports my network and scheme, and what does it charge?
  • Do I need exact, upto or auth-capture for this endpoint?
  • What happens to my handler output if the settle fails?

First three steps

  1. Run the @x402/express quick start against Base Sepolia with the x402.org facilitator
  2. Price one route at $0.01 and watch the PAYMENT-REQUIRED header
  3. Choose a production facilitator and compare its fees and networks

Metrics they care about

  • Paid requests per day
  • Verify and settle latency
  • Settle failure and settlement_pending rate
  • Revenue net of facilitator fees

A day in the life. Maya runs a weather API that used to sell monthly keys. She adds the Express middleware, prices the forecast route at one cent in USDC on Base, and points it at a facilitator. The first agent request gets a 402 with the price in a header; the retry carries a signature, the facilitator says it is valid, her handler runs, and the settle returns a transaction hash. On Friday a facilitator outage turns into a burst of 502 answers, and two settles time out. She checks both hashes on chain before retrying, finds one already confirmed, and writes a small reconciliation job so it never needs a person again.

Steps in the responsibility table

  • OwnsPublish payment requirements (402 with PAYMENT-REQUIRED)
  • Relies onVerify the payload (POST /verify)
  • OwnsRun the handler
  • Relies onScreen for sanctions (KYT, OFAC)
  • Relies onSettle on chain and pay gas (POST /settle)
  • OwnsReconcile settlement_pending
  • ImplementsReturn and store the PAYMENT-RESPONSE receipt
  • ObservesMonitor spend and anomalies

Visa Trusted Agent Protocol

Relevance: None

Not one of the main personas on the Visa Trusted Agent Protocol page. The responsibility table gives this persona no step.

Agentic Commerce Protocol (ACP)

Relevance: None

Not one of the main personas on the Agentic Commerce Protocol (ACP) page. The responsibility table gives this persona no step.

UCP

Relevance: None

Not one of the main personas on the UCP page. The responsibility table gives this persona no step.

Stripe MPP (Machine Payments Protocol)

Relevance: High

Runs the resource server: prices routes, issues bound challenges, verifies credentials and returns receipts, usually through mppx middleware. Source [10, 11, 12, 13]

Goals

  • Charge per call or per token without accounts or invoices
  • Accept stablecoins and cards from the same 402 response
  • Get paid before any side effect runs

Pains

  • Managing the HMAC secret that every challenge id depends on
  • Choosing between charge and a session for streaming endpoints
  • Keeping up with SDK advisories (four mppx advisories in 2026)

Implements

  • mppx server with one or more methods and a secretKey
  • Cache-Control no-store on 402 and private on receipts
  • Atomic consumption of challenge ids

Must trust

  • The rail to settle what it confirms
  • Its SDK version to enforce replay and close rules
  • Discovery crawlers to list it accurately (advisory only)

Questions they ask

  • Which methods do my buyers actually hold?
  • Do I sponsor Tempo fees with feePayer or hostedFeePayer?
  • How do I refund a stablecoin charge if delivery fails?

First three steps

  1. Run the mppx server quick start on the Moderato testnet
  2. Add a second method (stripe) to the same route and read both challenges
  3. Pin mppx to 0.8.2 or later and subscribe to the repository advisories

Metrics they care about

  • Paid requests per route
  • Share of 402s that convert to 200
  • Fee payer spend per day

A day in the life. Priya sells a weather API by the call. Her route answers unpaid requests with a Tempo challenge and a Stripe challenge, both bound with the HMAC secret she rotated last week. Overnight an agent fleet pays 40,000 times at one cent each; the receipts carry transaction hashes she reconciles each morning. A partner wants to stream forecasts per minute, so she adds a session route and caps the suggested deposit. When an advisory about fee payer draining appears, she upgrades mppx, checks her fee wallet balance, and adds a daily ceiling. Her one open worry: refunds on stablecoin charges are her own policy.

Steps in the responsibility table

  • OwnsIssue the bound challenge (402 with WWW-Authenticate: Payment)
  • OwnsVerify binding, expiry and proof
  • ImplementsSettle on the rail
  • OwnsReturn and store the Payment-Receipt
  • ImplementsClose or force-close session channels
  • OwnsHandle disputes and refunds

AP2

Relevance: None

Not one of the main personas on the AP2 page. The responsibility table gives this persona no step.

Mastercard Agent Pay

Relevance: None

Not one of the main personas on the Mastercard Agent Pay page. The responsibility table gives this persona no step.

Sources

  1. ERC-8004: Trustless Agents (specification source, ERCS/erc-8004.md) (external link)Ethereum ERCs repository. Specification, primary source. Published . Accessed .
  2. Agent Reputation Guide (best practices) (external link)erc-8004 (GitHub organization). Documentation, primary source. Published . Accessed .
  3. ReputationRegistryUpgradeable.sol (external link)erc-8004 (GitHub organization). Repository, primary source. Accessed .
  4. x402 Protocol Specification v2 (external link)x402 Foundation. Specification, primary source. Published . Accessed .
  5. @x402/express README (external link)x402 Foundation. Documentation, primary source. Accessed .
  6. x402 HTTP transport (V2) (external link)x402 Foundation. Specification, primary source. Published . Accessed .
  7. @x402/express middleware source (index.ts) (external link)x402 Foundation. Repository, primary source. Accessed .
  8. HTTPFacilitatorClient (httpFacilitatorClient.ts) (external link)x402 Foundation. Repository, primary source. Accessed .
  9. x402 docs: Facilitators (external link)x402 Foundation. Documentation, primary source. Accessed .
  10. The "Payment" HTTP Authentication Scheme (draft-httpauth-payment-01, repository source) (external link)Tempo Labs and Stripe (B. Ryan, J. Moxey, T. Meagher, J. Weinstein, S. Kaliski). Specification, primary source. Published . Accessed .
  11. wevm/mppx repository (README, src, SECURITY.md) (external link)wevm. Repository, primary source. Accessed .
  12. wevm/mppx repository security advisories (external link)GitHub (wevm/mppx). Other, primary source. Accessed .
  13. Tempo Session Intent for HTTP Payment Authentication (draft-tempo-session-00) (external link)Tempo Labs. Specification, primary source. Accessed .

Source details

    Loading the index.

    Enter open Esc close ? shortcuts