Fail-Closed Delivery Verification for Pay-Per-Call Agent APIs: A Delivery-Ledger Design for x402 Services
Year: 2026
Type: preprint
Abstract: Pay-per-call APIs built on the x402 protocol let autonomous agents buy single HTTP requests with stablecoin micropayments, settling each call on-chain through an EIP-3009 authorization. Operating such services in production exposes a verification gap that the protocol itself does not close: a payment can settle while the paid response is lost in transport, and a seller watching only its payment wallet cannot reliably tell which route a given settlement paid for, because many routes share the same price. This paper describes a fail-closed delivery-verification design developed and run in production on a five-service, 49-route x402 fleet on Base. Sellers record every paid delivery at delivery time in a single durable ledger — timestamp, service, route, payer, amount, and settlement transaction, verified against chain state at write time — and an independent reconciler joins on-chain transfers to ledger records by transaction hash. A settled transfer with no ledger record is raised as an unidentified-settlement incident and is never attributed by guessing from its amount. On the buyer side, the design enforces pre-signing validation of the payment challenge (network, asset, amount, and authorization validity window), hard spend caps checked before signing, and a lost-response rule under which settlement is reported as unknown and the payment is never automatically retried. We describe the failure modes that motivated each rule — including a response lost after signing against a third-party search API, and a third-party endpoint that repeatedly accepted payment authorization and then rejected the request — and report operational experience from the fleet's first month, including 127 external settlements reconciled as of November 16, 2026.
Author: Goertz-Brown, Quincy
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7233811882
