Agentspay
All posts

x402 Facilitator: What It Does, and Whether You Should Run Your Own

Agentspay · August 11, 2026 · 8 min read
Share
Agent Payments Console

Pick an agent

Payment intent

intent:

Policy evaluation

Human approval required

This spend is over your approval threshold. Approve it to issue a scoped card, or deny it.

Scoped virtual card issued

Agentspay

single-use

Wallet budget

spent of

Audit trail

Short answer: An x402 facilitator is a service that does exactly two things for a seller: it verifies that a signed payment payload is valid and funded, and it settles that payment on chain on the seller's behalf. It exists so an ordinary HTTP API can charge per request without anyone on the team managing wallets, gas or chain reorganizations. Most teams should use a hosted facilitator. Self-hosting is worth it when you need a chain or asset nobody hosts, when settlement latency is on your critical path, or when you cannot let a third party see every payment you take.

Where the facilitator sits in the x402 flow

The x402 protocol is a conversation between a client and a server: the server answers an unpaid request with HTTP 402 and a price, the client signs a payment and retries, and the server hands over the resource. Read only that, and there is no facilitator anywhere in the story. It appears the moment you ask a practical question: how does an HTTP server, written in Python or Go and running on a normal box, know that a signed blob of bytes represents real money?

It does not, and it should not have to. The facilitator is the answer. In the nine-step flow Coinbase documents, the server calls out to it twice. After the client resends the request with its signature attached, the server asks the facilitator to verify, and only proceeds if the answer is yes. After the server has generated the response the client paid for, it asks the facilitator to settle. Everything blockchain-shaped happens inside those two calls. Your application code never holds a private key, never estimates gas, and never waits on a block.

What verify actually checks

Verify is the cheap call, and it is the one that protects you from doing free work. It answers a narrow question: is this payload something that will settle if I try? That breaks down into a few checks that are worth knowing individually, because each one maps to a failure you will see in production.

  • Signature validity. Was this authorization actually signed by the key that controls the paying account, and is the signature well formed for the scheme in use?
  • Amount and recipient match. Does the payload pay the amount and the address the server quoted in its 402, rather than a cheaper one the client preferred?
  • Resource binding. Is the payload bound to this endpoint? Without this check a client could pay once for a cheap route and replay the same authorization against an expensive one.
  • Funds and allowance. Does the paying account hold the asset, and has it granted whatever allowance the settlement path needs?
  • Freshness. Is the authorization inside its validity window, and has it not already been used?

Verify is a read. It costs no gas and it is fast, usually a network round trip plus a chain read. That is the whole reason the protocol splits it out from settle: you want to reject a bad payment before you spend CPU generating a response, and you want to accept a good one without waiting for a block.

What settle actually does, and who pays the gas

Settle is the write. The facilitator submits the transfer to the chain, waits for it to confirm, and returns a settlement result the server passes back to the client in a response header. This is where the money actually moves, and it is where the surprises live.

The first surprise is ordering. In the standard flow the server does the work before it calls settle. That is deliberate, because making a buyer wait on a block confirmation would destroy the latency argument for paying per call. It also means the seller carries a small settlement risk on every request: verify said the payment was good, the work got done, and settlement can still fail on a reorg or a race with another spend from the same account. At a fraction of a cent per call nobody cares. If you are selling something expensive per request, care.

The second surprise is gas. Somebody pays the network fee to submit that transfer, and it is not the buyer signing an offline authorization. Hosted facilitators generally absorb it and price it into their fee or their platform relationship. If you self-host, it is yours: you fund a relayer account, you monitor its balance, and you discover what a gas spike does to your unit economics on a day the chain is busy. That single line item is the most commonly missed cost in a build-versus-buy comparison.

Hosted or self-hosted: the honest comparison

Coinbase runs a facilitator through its Developer Platform, and version 2 of the protocol turned facilitators into a genuine plugin point rather than something you fork the SDK to change. So both paths are real. They trade different things.

Hosted facilitatorSelf-hosted facilitator
Time to first paymentHours. Point the middleware at an endpointWeeks. Keys, relayer, monitoring, runbooks
Gas and relayer fundingAbsorbed by the providerYours, including spikes and top-up alerting
Chains and assetsWhatever the provider supportsAnything you are willing to integrate
Settlement latencyProvider round trip plus chain confirmationYou can co-locate and tune, chain time still applies
Who sees your paymentsThe provider sees every oneOnly you, plus the public chain
Failure blast radiusProvider outage stops your revenueYour outage stops your revenue
Best forAlmost everyone shipping a paid APIUnsupported chains, latency-critical paths, data residency or confidentiality constraints

The row people underweight is the last but one. A facilitator is not a cron job you forget about. It is an always-on service sitting directly in the revenue path, so it inherits every operational obligation that implies: provisioning, zero-downtime deploys, key rotation and someone paged when it stops. If your team does not already have a comfortable answer for keeping a production service up through deploys, that gap is the real cost of self-hosting, not the code.

What you are trusting a facilitator with

This is the part worth being precise about, because the honest answer is better than the fearful one. In the standard model a facilitator does not custody your funds. Settlement moves money from the buyer's account to the address the seller named in its 402 response. The facilitator submits that transaction; it does not become the owner of the proceeds along the way.

What it does get is position. It sees every payment you take: which endpoints, at what prices, at what volume, from which counterparties. For a business selling data or inference per call, that is a fairly complete picture of the business. It is also in a position to be slow or unavailable, and a facilitator that stalls does not lose your money but does stop your revenue until it recovers. Those are ordinary vendor risks of the kind you already evaluate for a payment processor, and they should be evaluated the same way: read the terms, ask about uptime history, and know what your fallback is.

Do buyers need a facilitator?

No, and this trips up a lot of teams reading the docs for the first time. The facilitator is a seller-side component. If you are the one being paid, you need one. If your agents are the ones spending, you need a wallet, a signing path and a policy layer, and the facilitator on the other end is somebody else's problem.

That asymmetry matters because the buyer side is where the protocol gives you the least. Nothing in x402 tracks how much your agent has spent today. The maxAmountRequired field in a 402 response is the seller declaring a ceiling on this one call, not a budget for you, and a client that faithfully implements the spec will happily sign the ten thousandth payment as readily as the first. We go through the ceiling problem in detail in can you set spending limits on x402. AWS made the same architectural point with Bedrock AgentCore Payments, where a payment session carries a maximum spend and the limit check runs before the payload is signed, so a denied payment never reaches a facilitator at all. That flow is worth studying even if you are not on AWS, and we walk through it in Bedrock AgentCore Payments explained.

How to choose a facilitator

Six questions, in the order they will actually bite you.

  1. Does it settle the chain and asset you need? Start here, because it eliminates most of the field. USDC on a major EVM chain or Solana is well served. Anything else, ask before you design around it.
  2. What is the fee, and is it a percentage or fixed? A fixed fee per settlement is fatal to sub-cent pricing, which is the whole reason most teams reach for x402 in the first place.
  3. What is the p99 on verify? Verify runs before you serve the request, so its tail latency is added to every paid response you return. The median is not the number to ask for.
  4. Does it support v2 properly? Version 2 shipped June 24, 2026 and renamed the headers, moved chains to CAIP identifiers, and added dynamic payment routing and endpoint discovery. A facilitator still built for v1 semantics will limit you.
  5. What happens on a settlement failure? You want a clear signal you can act on, not a swallowed error, because the work is already done by the time settle runs.
  6. Can you migrate? Since v2 made facilitators a registered plugin, changing one should be configuration. Confirm that before you assume it.

Where this leaves you

For most teams the facilitator is the least interesting decision in an x402 rollout, and that is the correct outcome. Pick a hosted one that covers your chain, check the fee shape against your price per call, and move on. It becomes interesting only in three cases: an unsupported chain, latency you cannot absorb, or a confidentiality requirement that rules out a third party seeing your payment flow.

The decision that deserves more of your attention is the one on the other side of the wire. Selling per call is a solved problem once a facilitator is in place. Buying per call, at machine speed, with an agent that has no concept of a monthly budget, is not solved by the protocol and never will be, because budgets belong to the payer rather than the payment. That is the layer worth building or buying deliberately: a hard cap per agent, a ceiling per counterparty, an approval threshold above which a person is asked, and a record that ties every settled payment back to the task that caused it. Agentspay enforces those controls across x402 and card rails from one place, so the same budget applies whether an agent is paying for an API call or buying from a merchant.

Try it in the sandbox

Give an agent a wallet, write a policy, and issue a scoped virtual card in an afternoon. Never moves money without policy.