how it works

One signature. No transaction. The bill on-chain.

An agent authorises a ceiling it cannot exceed. The seller charges only the actual. Every number lands on Hedera, where anyone can check it.

The flow, end to end
01off-chain · free
$0.50
Buyer signs a ceiling
one EIP-712 signature
02the meter runs
268
Seller does the work
tokens, counted after
03on-chain
$0.013
Facilitator settles the actual
pulled via HTS allowance
04immutable
HCS
Receipt anchored
$0.0001 · timestamped
You authorised $0.50 — you paid $0.013.the other $0.487 never moved
268 tokens × 50 = 13,400 atomic · 2.7% of the ceiling
This is the loop npm run agent:auto runs unattended — six purchases in a row, each one audited, with no human in the loop.
Why a contract

Permit2 — but native to Hedera.

A raw allowance isn’t single-use, never expires and binds no recipient — so a contract has to enforce those. The rails were already here: HIP-336 grants an allowance to a contract, HIP-376 lets it spend transferFrom.

the signed authorisation
from 0.0.buyer
to 0.0.seller
maxAmount 500000
nonce 0x9f…
validAfter / deadline
one signature · zero gas
Single-use
the nonce burns — even on a $0 charge
Time-bound
valid only between validAfter and deadline
Recipient-bound
payTo is signed — edit it, break the signature
Max amount
settle anything from $0 up to the ceiling, never above

The contract has no owner and no upgrade path — it enforces the four in consensus, or it reverts.

The proof

An overcharge is just wrong arithmetic.

The seller signs the price before the work and the meter reading after, both anchored to HCS. So it can’t show one price to you and another to an auditor.

Anyone re-derives the verdict from the public Mirror Node:captured ≠ units × signed price ⇒ fraud.

npx x402-hedera-receipts audit --tx …
✓ signer resolves to a Hedera account key
✓ four artifacts, one key — undeniable
✓ the settlement exists on-chain
✓ terms on HCS match what the buyer signed
✗ charge equals units × the signed price
    186 × 50 = 9,300, but 27,900 was taken

VERDICT  ⛔  arithmetic_fraud
The seller signed these numbers.
One honest limit

It can’t prove the token count is true.

The seller counts the tokens — a consistent liar could inflate them. What changes is that the count is now signed, timestamped and bound to what was delivered. The buyer can recount and then holds the seller’s signature on a false number. That is the difference between a dispute and a complaint.

AUTHORISE A CEILING · PAY THE ACTUAL ✦ FIRST NON-EVM UPTO IN X402 ✦ SOFTWARE PAYS SOFTWARE · NO HUMAN IN THE LOOP ✦ AN OVERCHARGE IS ARITHMETIC ANYONE CAN CHECK ✦ RECEIPTS ON HCS · $0.0001 EACH ✦ AUTHORISE A CEILING · PAY THE ACTUAL ✦ FIRST NON-EVM UPTO IN X402 ✦ SOFTWARE PAYS SOFTWARE · NO HUMAN IN THE LOOP ✦ AN OVERCHARGE IS ARITHMETIC ANYONE CAN CHECK ✦ RECEIPTS ON HCS · $0.0001 EACH ✦