Pay-per-call works for an API call that costs a cent: the money moves with the request, and if the answer is bad, nobody loses much.
It stops working when an agent buys something it cannot judge in the moment: a research report, a model run, a build. The buyer needs a way not to pay for bad work. The seller needs to know the money exists before starting. x402's exact scheme gives neither, because it settles with the request.
This week we released a second option on Base: payOnProof, in arl-protocol-sdk 0.3.1.
The idea in one paragraph
Keep the HTTP 402 negotiation, change what "paid" means. The caller locks the price in an escrow. The service does the work. A committee of staked validators, named in the terms, checks the result against a pinned specification. Only then does the escrow pay the service. If the committee rejects the work, or nobody delivers, the caller is refunded.
The selling side
One wrapper around a handler. It runs anywhere the Fetch API does: Next.js route handlers, Hono, Cloudflare Workers, Bun, Deno.
import { payOnProof } from "arl-protocol-sdk"; export const POST = payOnProof( { clients, // the service's own wallet: the provider that gets paid offer: { chainId: 8453, provider, specUri, specHash, budget, committee, threshold: 2 }, }, async (req, job) => { const result = await runTheJob(await req.json()); // the work the spec describes return { body: JSON.stringify(result), deliverable: resultHash }; }, ); What the wrapper does for you:
- A request without a job gets
402with your terms: price, escrow, the job specification and its hash, the committee and how many approvals decide. - A request with a job is checked on chain before any work: is the job funded, is it for you, is the budget your price, are the specification and the committee the ones you offered?
- Your handler runs once per job. A second request for the same job gets
409. - The response carries the deliverable hash, and the SDK submits it on chain once the committee has accepted the job.
expressPayOnProof is the same thing for Express.
The buying side
import { payVerified } from "arl-protocol-sdk"; const { response, jobId } = await payVerified(clients, "https://service.example/run", { maxBudget: 25n * 10n ** 18n, // refuse any offer above this init: { method: "POST", body: JSON.stringify(input) }, }); payVerified asks, reads the 402, refuses terms above your limit or on another chain, opens and funds the job, and asks again with one header:
X-ARL-Job: 8453:0x9aE99bF9a59aF47E81346B7c0b93Cd2B610455fC:17 There is no signature to pass. The proof of payment is the job's state on chain.
exact and arl-escrow side by side
exact | arl-escrow | |
|---|---|---|
| Money moves | with the request | after the result is verified |
| Buyer's risk | pays for whatever comes back | refunded when the committee rejects |
| Seller's risk | none | paid only for work that verifies |
| Settlement | one transaction | the vote and challenge windows in the terms |
| Suited to | calls priced in cents | jobs worth checking |
They are not rivals. A service can offer both in the same 402: exact for the cheap call, arl-escrow for the job.
What it costs you, honestly
- The caller sends several transactions and needs gas. One signature for the whole payment needs a batched call or a router contract; that is not in this version.
- Settlement takes the vote and challenge windows you put in your terms, so this does not suit calls that must settle in seconds.
- The committee today is three validators run by one operator. Anyone can stake and be named on a committee, and the list is public at
arlcoin.io/api/v1/validators; an open market with random selection is on the roadmap, not live.
Where to look
- Specification of the scheme: x402 arl-escrow v0.2.0
- Quickstart: arlcoin.io/build
- A real job settled this way, step by step: the audit trail of job 1
- For agents:
npx arl-protocol-mcp(0.2.0); for Python:pip install arl-protocol(0.4.0)
If you sell an API to agents today, we would like to hear which of your endpoints you would put behind escrow, and which you would not.

