Agents don’t need a checkout. They need a quote they can refuse.
The right flow is simple. Three steps:
- Agent states what it wants
- Platform provides a quote
- Agent pays or moves on
That framing came out of a thread with Kevin (@kleffew94) — co-author of the x402 whitepaper, now building agent payments at Coinbase — on agents buying data on demand. Andrew (@andrewhong5297), co-founder of Herd and formerly Headmaster at Dune, pushed on the opposite failure mode: unknown costs up front.
If price isn’t agreed before a transaction, someone is likely to lose. For any ordinary purchase we expect terms before the deal. Restaurants don’t prepare meals hoping someone will buy them, and nobody orders food without knowing what it will cost. Agents should get the same courtesy.
If a price isn’t adjusted for an agentic transaction, it can be economically irrational. Most x402 offerings today fall into that category.
Most “agent-native” x402 deployments still fail that test in one of two ways:
- Work first, settle later: run the job, then figure out the bill.
- Wrong grain: the rail is right, but the cost is way off.
Work first, settle later
In that thread, Andrew clearly states the problem: for a SQL query you may not know the cost until it finishes, so do you make the agent put up an escrow and refund the surplus?
At first glance this appears rational. In fact, it’s a vendor shortcut disguised as payment UX.
A vendor should be able to figure out what a job will cost to run with relative accuracy. Not revealing a job’s price until after the job is complete puts the agent in a terrible position because it can’t say “no” before committing. At the outset, the escrow has to be considered the cost of the job. A refund is a bonus.
Dune provides a concrete example. Dune doesn’t use x402 — but it is the canonical version of the pattern that x402 offerings often copy. Its credit system bills from actual compute after the query runs. Processing, data scanned, and engine time are all taken into account. Dune’s own FAQ is blunt: “Will I see the cost before running a query? You’ll see costs after execution.” They don’t publish a single per-query price because usage depends on real-time factors. You can set a per-query credit cap and a monthly extra-credit limit, but those are ceilings on a bill you still get after the work.
Wrong grain
The unit of settlement is coarser than the unit of work.
Even when the quote is clear, the unit is often still wrong.
The Graph’s Studio (designed for humans) meters GraphQL queries: 100,000 free per month, then $2 per 100,000 queries, about $0.00002 per query.
The agent x402 path on the same network is still per GraphQL query. Official Graph docs describe the flow, not a price. They leave that to the ecosystem clients. PayQL’s live gateway preflight returns USDC 0.01 per paid gateway query.
Same data network. Same query grain. $0.01 per agent query vs. $0.00002 per Studio query — a 500x difference. Agents inherited human GraphQL metering and a cent-scale floor. The reason is almost certainly technical:
- Settling a transaction lower than $0.01 isn’t economically viable, even on chains with very low fees.
- Batching small transactions until settlement becomes economically viable is complicated. x402 supports it, but the needed escrow contracts aren’t available on most chains.
What Testril does instead
The fix is not a nicer checkout. It is a quote primitive.
Two problems to fix: price before work, and prices in line with actual work.
Quote first
Same three-step loop for every paid request:
- Unpaid call returns soft
payment_requiredon the success path:quote_id, line items, amount. - Agent calls
pay_quote({ quote_id[, payload] })if it accepts. - Same verb again with
payment_idonly.
quote_id freezes the work for 120s (an eternity for agents). After that, re-quote. You buy what was quoted. No Dune-style “cost after execution.”
Batch micropayments
Settling every agent hop on-chain at a cent is expensive. Settling below a cent needs batching.
Testril uses two settlement schemes on accepts:
- Exact: one EIP-3009 USDC transfer per quote (payload required) for work at or above the floor (currently $0.01).
- Batch-settlement: buyer deposits USDC into an x402 batch escrow, then signs vouchers for later quotes. Each later quote is a new voucher, not a new transfer. Testril accumulates vouchers until they reach an aggregate amount worth settling.
In future, the settlement floor may change, but the settlement mechanism won’t. It’s difficult to imagine a time when settling USDC 0.000001 becomes viable.
The real UX is the quote
x402 is not interesting because it lets software pay a web server. That part is plumbing.
The interesting part is what the payment flow teaches the agent before it commits.
For agents, price is not a checkout detail. It is part of the interface. A usable agent service needs to answer three questions before work begins: what will you do, what will it cost, and what exactly am I buying?
If the answer comes after execution, the agent cannot be a rational buyer. If the unit is wrong, the price is only technically correct. A one-cent floor on a query that should cost a thousandth of a cent is not micropayment infrastructure. It is human-era pricing dragged onto an agent rail.
The right abstraction is quote-first, settle-later. Give the agent a firm price, freeze the work long enough to accept, and batch the tiny units until settlement makes economic sense. The chain should clear value. It should not force every useful action to become a standalone financial event.
That is the UX standard x402 has to meet. Not “can an agent pay?” but “can an agent decide?” Agents need to compare, refuse, route around, and optimize. They need prices in the same place they need schemas, latency, and quality signals: before the call.
Payment rails matter. But agent-native commerce starts at the quote.