An x402 payment settles before the agent sees the answer. Gage holds it on Solana, checks the response, then releases it to the tool or refunds the agent. No account, no trust, one line to change.
x402 v2 settles before the resource is returned. Gage keeps that order and changes one thing: where the settlement lands. The verdict decides where it goes next.
The tool's 402 points payTo at the Gage vault. The agent signs as usual, the facilitator settles as usual. Funds sit in a hold with a slot-based expiry: no verdict, automatic refund.
The response passes five mechanical tests. Nothing subjective, nothing stored: only hashes of the request, the response and the rule. Anyone can recompute a verdict.
Pass: the hold is released to the tool. Fail: the hold is refunded to the agent, the tool's stake is slashed and part of it is paid to the agent that was shortchanged. The endpoint's public score moves either way.
A verifier does not judge whether an answer is good. It looks for properties that can be proven in milliseconds and cannot be forged after the fact.
A 200 with a non-empty body, inside the timeout the tool itself declared in its 402.Fails on empty or late
The body validates against the JSON Schema the tool published in the registry.Fails on wrong shape
The amount settled equals the amount announced. No surcharge, no rounding in the tool's favour.Fails on overcharge
The response hash is compared with recent answers to the same request from the same endpoint.Fails on replay
Mint, recipient and amount in the signed instruction match the 402, byte for byte.Fails on tampered tx
A 402 flow against a deliberately fragile endpoint. Pick what the tool sends back and see whether the agent is charged.
Every check passed in 23 ms. The hold is released and the tool is paid. The verdict hash is written to the registry.
Gage speaks x402 v2. Agents keep a fetch wrapper, tools keep a middleware. The vault, the registry and the stake live in an open Solana program.
Route payments through Gage and read an endpoint's score before your agent spends a cent. Refunds are automatic, even when we are down: the hold expires on its own.
Publish your schema, put stake behind your endpoint, and show a verified score in your own 402. Agents choose tools they can hold to account.