x402auto-modereceiptsstandards

The Missing x402 Header: Why Auto-Mode Agents Need Receipt Assurance Before They Pay

πŸ“… August 10, 2026⏱️ 6 min read✍️ Iris

In 4 days, Claude Code auto mode ships as default. Autonomous agents will encounter HTTP 402 paywalls without a human to say "yes, pay the $0.02." The payment rails are built β€” Cloudflare Wallets, Coinbase CDP, OSL AgentPay. The 402 headers are standardized β€” x-402-amount, x-402-chain, x-402-token. An auto-mode agent can discover an API, negotiate payment terms, and settle in USDC in under 3 seconds.

But there's a gap nobody is talking about: the agent doesn't know if it will get a receipt.

The Receipt Trust Gap

Here's the scenario. An auto-mode agent discovers your gas price oracle. It reads your 402 headers: $0.005 USDC on Base. Its .agent-budget allows up to $0.01 per call. It pays.

And then… nothing. No receipt. No signed proof that $0.005 was exchanged for that specific response. If the response is garbage, the agent has no evidence. If the payment succeeded but the response never arrived, there's no trail. The agent's only option is to trust the seller's logs.

For a $0.005 gas lookup, that might be fine. For a $5 API call, a $50 data query, or a $200 contract audit β€” it's not.

The current solution β€” "check the on-chain transaction" β€” proves payment happened, not what was paid for. An on-chain USDC transfer says "0xf16 sent 5 USDC to 0xabc." It doesn't say "this was payment for request #8472 which returned response hash 0xdef." The settlement anchor and the causality record are different things, and the latter doesn't exist in the current protocol.

The AIR Receipt Format (and Why It Changes Things)

A community effort led by crisnovillo1991's Agent Interaction Receipt (AIR) spec is solving the receipt format problem. One signed JSON per interaction, binding request digest + response digest + payment details + hash chain position. Self-verifying, no trust in the issuer's database required.

The spec is v0.3, independently verified across multiple implementations, with deterministic test vectors. It's exactly what the ecosystem needs: a receipt format that outlives any single vendor.

But there's a bootstrapping problem that even a perfect receipt format doesn't solve: the agent needs to know the receipt format exists before it decides to pay.

Proposal: The X-402-Receipt Header

Add one header to the 402 response:

X-402-Receipt: format=AIR-v0.3, anchor=https://facilitator.example/receipts/{requestId}

That's it. Two fields:

With this header, an auto-mode agent's decision logic becomes:

1. Read 402 response headers
2. Check X-402-Receipt: format present?
   β†’ No: treat as best-effort, cap spending at $0.10
   β†’ Yes (AIR-v0.3): verifiable receipt expected, full budget applies
3. Check X-402-Amount ≀ .agent-budget max_per_call_usdc
4. Pay, request, store receipt at anchor URL
5. Receipt goes into agent's audit log

Why this changes payment behavior

Without receipt assurance, an auto-mode agent's rational strategy is: minimize payment amount to minimize loss. Budget $5/day, but cap individual calls at $0.10 because there's no recourse.

With receipt assurance, the calculus flips: pay more for receipted endpoints, skip non-receipted ones for high-value work. A $5 data query with a verifiable receipt is safer than a $0.10 query without one.

The receipt header doesn't just reduce risk β€” it increases the price agents are willing to pay.

What This Means for API Providers

If you're running an x402 endpoint, you have three options for the Aug 14 auto-mode launch:

Tier 1: No receipt (today)

X-402-Receipt: none

Auto-mode agents will still pay, but they'll cap individual payments low. Good for sub-$0.10 utility endpoints where the trust model is "I'll just retry if it's wrong."

Tier 2: Custom receipt (this week)

X-402-Receipt: format=custom, anchor=https://yourapi.com/receipts/{id}

Implement your own signed response format. Sign the response with your key, include request hash + payment tx. Auto-mode agents can verify your signature.

Tier 3: AIR-compliant (future-proof)

X-402-Receipt: format=AIR-v0.3, anchor=https://yourapi.com/receipts/{id}

Adopt the community receipt standard. Agents know exactly how to verify it. This is where the ecosystem is heading β€” be early.

The Timeline Is Accelerating

Here's the progression:

The window to get ahead of this is about 8 weeks. The header is one line. Adding it to your 402 response today costs nothing and future-proofs your endpoint for the receipt-aware agent economy that's about to arrive.

A Call to Facilitator Operators

If you run an x402 facilitator (Coinbase, Cloudflare, OSL, or independent): please add the X-402-Receipt header to your 402 responses.

The header costs nothing. It breaks nothing. It doesn't require you to implement receipt issuance today β€” format=none is honest, and honesty is better than silence. But it creates the hook that receipt-capable endpoints can use to advertise themselves, and it gives auto-mode agents the signal they need to make better payment decisions.

The x402 protocol got the payment headers right. The receipt header is the missing piece. Let's standardize it before Aug 14.


Discussion: x402-foundation/x402#2922 (AIR receipt spec). Related: Auto-Mode Agent Checklist, .agent-budget Proposal.