Guide // MandateGuard
How do you verify a hash-chained receipt ledger?
By the Ingenious AI team · Published 2026-11-14 · Reviewed 2026-11-14
▸ Run the free live demo See pricing
Free covers 1 agent and 1 policy with the full authorize flow, signed receipts and the approval inbox — no card required to start.
Short answer
You verify a hash-chained receipt ledger by recomputing it: for each receipt in sequence, rebuild its hash from the previous receipt's hash and the receipt's stored content, and compare. MandateGuard's verify-chain endpoint does this over your workspace's rows and returns a verdict plus the receipt count. A verified verdict proves no stored amount, vendor or decision was altered after the fact — the property that makes receipts usable in audits and disputes. Run it at setup, monthly with your evidence export, after incidents and migrations, and any time a receipt is about to be relied on by someone else.
What does verify-chain actually check?
Chain verification is the recomputation of a workspace's receipt ledger: for each receipt in sequence, recompute its hash from the previous hash and the receipt's canonical content, and compare against the stored hash and signature. MandateGuard's verify-chain endpoint performs this over the stored rows and reports a verdict plus the number of receipts checked. A verified chain means no stored amount, vendor or decision has been altered since it was written.
The idea in one paragraph
Each receipt commits to the one before it. Receipt 42 contains the hash of receipt 41 as an ingredient of its own hash, so the entire history is braided into every new entry. To verify, you replay the braid: start from the first receipt, recompute each hash from the stored fields and the previous hash, and compare with what is stored, checking the server signature as you go. If every link recomputes, the ledger is exactly the sequence that was written, in the order it was written. If any stored field was changed — an amount nudged, a denial deleted, two rows swapped — the braid breaks at that point, and verification tells you where.
What verification proves — and what it does not
Verification proves integrity: the record you hold is the record that was created, unedited. It does not prove the decisions were wise, the policy was well set, or the goods arrived. Those are judgement questions answered by reading the receipts, not recomputing them. Keeping this boundary clear makes verification more useful, not less: in a dispute, integrity is usually the contested point (did the agent really get refused? was this approval really given then?), and a verified chain answers it without asking anyone to trust your database hygiene. Pair verification with the audit routine — reconcile totals, read approvals — and the two together cover both is this real and was this right.
When to run it
Run verification at setup, so your baseline is a known-good chain with its first receipts. Run it monthly, in the same sitting as your receipt review and evidence export, and file the verdict line with the period. Run it after any incident, especially a freeze, because the incident narrative will lean on the chain. Run it after infrastructure events — database migrations, restores, provider changes — because silent corruption is exactly what recomputation catches. And run it whenever a receipt is about to be relied on externally: a dispute, an audit, an insurance claim. The habit costs seconds and converts each of those moments from an argument into a demonstration.
Reading a broken verdict
A broken verification is a finding, not a catastrophe — but it must be treated as a stop sign. Note the sequence where recomputation fails; that localises the alteration to a specific receipt and its neighbourhood. Preserve the current state before attempting any repair: export what exists, because the broken state is itself evidence about what happened. Then work out which of the few possible causes applies: an application bug writing malformed rows, a manual database edit by an operator, a restore from a partial backup, or genuine tampering. Each cause has a different remedy and a different disclosure obligation to anyone who has relied on your chain. What you must not do is quietly patch rows until verification passes; a chain repaired into consistency has lost the very property it exists to provide.
Verification across parties
For shared mandates, verification extends beyond your own workspace. The intent service lets a holder of a read-only merchant or agent role key verify a specific receipt against a registered intent: hash, signature, workspace chain and intent linkage are all checked, and the verifier gains confidence in the receipt without gaining any ability to write to the intent. This is the cross-party version of the same idea — proof that travels. Issuers use it to confirm that an authorisation they see claimed actually occurred under the intent; merchants use it before honouring a mandate-backed order. Internally you verify the whole chain; externally, parties verify the receipts that concern them.
Keeping the chain verifiable over years
Long-lived ledgers face mundane enemies: format migrations, key rotations, staff turnover. Keep three habits. First, never edit receipts through any admin path; corrections in this system are new information (an adjustment event, a new decision), not edits to history. Second, export evidence packs at period ends so verified snapshots exist outside the live database. Third, document your verification rhythm and verdicts in the same place as your other financial controls, so a successor operator inherits the practice, not just the endpoint. A chain that is verified routinely for years becomes something rare in agent operations: a memory the business can actually rely on.
Five actions to take now
- Run verify-chain after setup, then on a monthly rhythm
- Always verify after an incident, a migration or a dispute
- Record the verdict and receipt count with the period's records
- If verification breaks, stop and investigate the named sequence first
- Include the verdict in every evidence export you produce
Worked example: verification settles a he-said-she-said
A workspace with 1,024 receipts runs its monthly verification: verdict verified, count 1,024. The finance lead files the verdict line with the month's pack. Two quarters later, a vendor dispute questions whether a March denial was genuine or invented after the fact. The team re-runs verification — still verified at the full count, including March — and produces the receipt: the denial is in the chain, hash-linked to its February predecessor and March successor.
The denial's neighbours are what settle it. An invented row inserted later could not reproduce the chain of commitments around it without breaking verification. The dispute closes on the strength of arithmetic the team can re-run in front of anyone.
Frequently asked questions
How long does verification take?
Recomputation is fast for typical workspace sizes and runs as a single endpoint call returning the verdict and count.
What does a broken verdict mean?
Some stored row no longer matches its hash commitment — data was altered, corrupted or migrated incorrectly. The failure point localises the investigation.
Does verification check my policy settings?
It checks the receipt ledger's integrity. Policy interpretation is a separate review; keep policy snapshots with your period records.
Can verification be faked by re-writing the whole chain?
Rewriting a consistent alternative history would require defeating the server-side signing as well; receipts are HMAC-signed, and cross-party intent verification adds an external check for shared mandates.
Who can run verify-chain?
The workspace, with its credentials. External parties verify specific receipts through the intent service's verify-receipt path with read-only keys.
Keep reading
- What is a mandate receipt? Hash-chained proof for agent spend
- What is an evidence export for agent spending audits?
- How do you audit AI agent spending?
Put the policy in force: spend envelopes · intent registry · approval inbox · how the proof works · all MandateGuard guides