Petri
Intercepta · Add Payment Screening to Your Agent or x402 Service

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.

  1. 1Setup
  2. 2The job
  3. 3HTTP 402
  4. 4Petri's limits
  5. 5Quick Scan: payTo
  6. 6Authorization
  7. 7Decision
  8. 8Seller's side
  9. 9Stopped payments
  10. 10Record
1

Setup

Blocked

Two 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.

Not configured. Add to .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.
2

The job: the agent buys a version as markdown

Not run yet

A 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.

3

The seller asks for payment (HTTP 402)

Not run yet

The seller's price, token and wallet appear here, decoded from its PAYMENT-REQUIRED header.

4

Petri's own limits (no network)

Not run yet

Checked before any Intercepta request is spent. x402's spend controls enforce the same cap a second time inside the x402 client.

Not run yet.

5

Intercepta Quick Scan on payTo

Not run yet

Runs 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.

6

The payment authorization and Intercepta Scan Message

Not built

The 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.

7

Decision

Not run yet

Reject beats hold, and hold beats pay. Any error, timeout or missing scan holds.

8

The seller's side: payer screen, settlement, the file

Not reached

The 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.

9

Stopped payments

None yet

Try the rogue seller (Intercepta blocks it) and the greedy one (over Petri's limit).

No stopped payments yet.

10

Record: petri/.petri/payments.jsonl

0 records

Every attempt is one line, with the raw Intercepta responses. Click one to show it above.

No records yet.