Open source · Visa TAP, Mastercard Agent Pay, AP2

Prove what the agent was allowed to buy.

An open-source verifier for AI agent orders. Check signatures and shopper limits at checkout, keep tamper-proof records for when the chargeback lands months later.

$ npm i @provethebuy/verify
checkout.js
import { ProveTheBuy, KeyDirectory, KNOWN_DIRECTORIES }
  from "@provethebuy/verify"

const ptb = new ProveTheBuy({
  merchantId: "acct_your_shop",
  keys: new KeyDirectory({
    sources: [{ name: "visa", url: KNOWN_DIRECTORIES.visa }],
  }),
  policy: { mode: "shadow" },  // record only, never block
})

app.post("/checkout",
  agents.capture(), agents.verify(), handler)

      
ALLOWED

Verifies agents from

Visa Mastercard Stripe OpenAI Anthropic Perplexity
CLI

Start with one command. No account needed.

Point the CLI at an access log and see how many AI agents already reach your store, hit checkout, and sign their requests.

Your logs stay on your machine

The log is read locally and never uploaded. Works with nginx, Apache and most combined log formats.

Point it at your checkout

Pass --checkout /buy,/cart if your paths differ.

Share the result

Prints a one-line summary you can post, so other devs can compare numbers.

How it works

Three checks at order time. One record for dispute time.

Runs inside your server, never sees a card number, starts in shadow mode.

1
Verify

Verify the agent's identity

Checks the HTTP message signature (RFC 9421) against the network's key directory. Rejects replays, expired signatures, and edited requests.

keyid, nonce, created, expires
keyided25519/agent-9f2c...
nonceb3f28a...unique
created1700000000
expires1700000300
Signature verified
2
Bind

Bind the order to the mandate

Checks the shopper's signed mandate and payment token limits. Confirms this exact cart, amount and merchant are within scope.

RFC 8785 + SHA-256 order hash
Amount$184.00
Limit$250.00
Merchantacme_store
Token scopecart_checkout
Within mandate
3
Record

Keep the proof forever

Writes a hash-chained evidence record with a key snapshot. When a dispute arrives, it re-verifies and builds the evidence pack.

evidence.jsonl
0a3f29b...d4e1 ↓
1b7c182...f9a3 ↓
29f2c47...01bc ↓
3e81d5a...7f20
Protocols

What it verifies today

Agent-commerce standards are still settling. This says plainly how far each one is implemented.

ProveTheBuy
verifier core
Zero dependencies. Full control.

Run the whole thing locally in 60 seconds

Replay & tampered scenarios
Every check with raw headers
YAML policy with dry run
Sample dispute evidence packs
~/provethebuy
Agent Traffic
Verification Log
Policy Editor
Dispute Evidence
Cloud

When the chargeback lands, the record does the talking

Free verifier + paid Cloud. The evidence builds itself — you just click submit.

Order placed
Verified & filed
Signature, mandate and key snapshot saved to the ledger
$184.00 · acme_store
3 months later
Chargeback arrives
Reason 10.4 — unauthorized transaction on $184.00
Auto-analyzed
Verdict: fight
All proofs re-verified against archived keys
11 days later
Dispute won
$184.00 recovered automatically
rec_o4Vx8KrZkA0OGlwmFiled 2026-10-04 09:41 UTC
Chargeback on order #48213Reason 10.4 · $184.00
FIGHT
Shopper set this limitSigned mandate: up to $250 at this store
VI, ES256
Agent identity confirmedSignature verified against network key
TAP, Ed25519
Sent once — not a replayNonce first seen at checkout time
nonce ok
Record untamperedHash matches the one filed at checkout
sha256 9f2c...
FAQ

Questions developers ask

Something missing? Open an issue.

Will it block real customers?+

Not unless you tell it to. Starts in shadow mode — only records. Requests without an agent signature pass through. If the verifier errors, the order goes through by default.

Does it touch card data?+

No. It reads agent signatures, signed mandates and payment token limits. Never decrypts payment containers or sees card numbers. Adds nothing to PCI scope.

Which runtimes work?+

Node 18.17+ with Express middleware. The core takes a plain request object. Python and Go ports are planned and will pass the same test vectors.

How does a dispute months later still verify?+

Each record keeps the raw signed request and a snapshot of the key used that day, chained by hash. Re-verification uses that snapshot, so it works even after the agent rotates its key.

What does it cost?+

The verifier and CLI are free and Apache-2.0. Cloud: free up to 1,000 verified orders/mo, paid plans from $9/mo for dispute handling.

See what your agent traffic
looks like today.