Checklist · · mandate-scope · Español

Mandate test checklist

Tests a signed mandate should pass before an agent can capture. They come from public threads with Evren Cucur (@EvrenCucur) and PayAI (@PayAINetwork), plus one case LupaRiel raised in those threads. If a single test fails, the capture does not go out.

The tests

Each test carries a status. Covered by scope: /api/mandate/scope checks it and the repo tests include a case for it. Partial: scope checks part of it. Pending: no LupaRiel endpoint runs it yet. Out of scope: the endpoint does not cover it by design. Reviewed on .

  1. Pending Replay on a different booking or merchant. The same signed approval cannot pay a different booking or a different merchant. Evren asked this when he talked about timing and replay.
  2. Pending Two captures at the same time. If two captures start from the same approval at once, one has to fail. The mandate is not charged twice.
  3. Pending Terms change after the reservation is authorized. A higher price, a later expiry or a new cancellation fee cannot ride on the old approval. That needs a fresh authorization. The original hold grants no extra permission.
  4. Pending Terms change after verification and before execution. Evren called this the hard case. If the terms move in that window, the capture has to fail.
  5. Pending Same price, different cancellation fee. The case LupaRiel raised in that thread: if only the cancellation fee changes, the old approval has to fail.
  6. Pending A hash is not consent. Hashing price, expiry, cancellation terms and merchant identity proves integrity, not that the user authorized that version. The user has to sign that exact hash. Evren drew the distinction and LupaRiel took it.
  7. Covered by scope Signature and expiry before capture. Before capture, check that the mandate signature is valid and that it has not expired. These are two of the six checks in /api/mandate/scope (signatureValid and notExpired).
  8. Out of scope Revocation before capture. Before capture, check whether the mandate was revoked. This is out of scope: the Mandato AR v0.1 mandate has no revocation registry, so the buyer or whoever issues the mandate has to handle it.
  9. Pending Verify before settle. As PayAI described it: run /verify first (signature, amount, payee and expiry checked against the 402). Only then /settle.
  10. Pending The cap belongs to the wallet that signs. The cap cannot be moved to another wallet. It stays with the one that signed, as PayAI put it.
  11. Partial A merchant cap with an expiry. An agent cannot widen the hold on its own.

What /api/mandate/scope covers today

/api/mandate/scope takes a Mandato AR Intent Mandate, a URL and a proposed price, and returns six checks: schema, signature, expiry, network, allowed resource and budget. It is informative: it does not create, sign or block payments. It costs 0.02 USDC per call on Base.

It does not yet cover replay across bookings or merchants, concurrent captures, a terms hash, cancellation-fee changes, revocation, the amount or payTo on the real 402, or a cap bound to the signing wallet. Those tests stay on this public list until the endpoint or the buyer can run them.

The comparison ChatGPT Wallet vs x402 mandates explains what a signed mandate carries and how approving a scope differs from approving each purchase. The note validate the mandate before paying says what to check between the 402 and the signature. This page lists the tests that check should pass.

Sources