An agent buys a version, screened before anything is signed
The Petri agent buys a version's record as a markdown file over x402, in test USDC on Sepolia: what an agent reads before it builds on that version. Before the agent signs, Intercepta screens the wallet it would pay and the exact payment authorization. Before the seller accepts, it screens the payer. Any failure holds the payment; nothing is paid by default.
- 1Setup
- 2The job
- 3HTTP 402
- 4Petri's limits
- 5Quick Scan: payTo
- 6Authorization
- 7Decision
- 8Seller's side
- 9Stopped payments
- 10Record
Setup
BlockedTwo wallets and one key. The Petri agent pays with Sepolia USDC and needs no ETH. The seller's relayer pays the gas to settle. Intercepta screens every payment. This check spends no Intercepta request.
.env.local, then restart npm run dev:INTERCEPTA_API_KEY: Not set. Every payment will be held, because Petri never pays an unscreened wallet.PETRI_PAY_PRIVATE_KEY: Not set.PETRI_X402_RELAYER_KEY: Not set.
The job: the agent buys a version as markdown
Not run yetA shorter prompt without the signatures and the reply-shape block keeps the pass rate and cuts tokens, because the model already writes fenced code.
Preview is the agent before this feature: it takes the 402 and builds the authorization it would sign, with no checks. It never signs. An honest paid run makes three Intercepta scans and one Sepolia transaction.
The seller asks for payment (HTTP 402)
Not run yetThe seller's price, token and wallet appear here, decoded from its PAYMENT-REQUIRED header.
Petri's own limits (no network)
Not run yetChecked before any Intercepta request is spent. x402's spend controls enforce the same cap a second time inside the x402 client.
Not run yet.
Intercepta Quick Scan on payTo
Not run yetRuns in x402's onBeforePaymentCreation hook, before the authorization exists. Intercepta has no testnet data, so it scores this address by its mainnet history.
Not run yet.
The payment authorization and Intercepta Scan Message
Not builtThe x402 scheme builds an EIP-3009 TransferWithAuthorization and hands it to Petri's signer. The signer checks it against the 402 and sends the exact typed data to Scan Message, under mainnet chain id 1. It signs only after both pass.
Not built yet.
Decision
Not run yetReject beats hold, and hold beats pay. Any error, timeout or missing scan holds.
The seller's side: payer screen, settlement, the file
Not reachedThe seller checks the signature with its in-process facilitator and screens the payer with Intercepta in x402's onAfterVerify hook. Then it settles on Sepolia and sends the file.
Reached only when Petri signs and sends the payment.
Stopped payments
None yetTry the rogue seller (Intercepta blocks it) and the greedy one (over Petri's limit).
No stopped payments yet.
Record: petri/.petri/payments.jsonl
0 recordsEvery attempt is one line, with the raw Intercepta responses. Click one to show it above.
No records yet.