Skip to content

Verifying Proofs

Check receipt proofs from webhook payload data.

When you receive a delta.verified webhook, you can check that your record is included in the proof.

For receipt and invoice-proof payloads, verificationApiUrl is the machine verification endpoint to call from tools, agents, and auditors. verifyUrl is the human invoice link. verificationExplorerUrl remains for compatibility.


Proof Payload Fields

Example payload fragment:

json
{
  "proof": {
    "proofHash": "0x8f3a9b...",
    "contentHash": "0x2d4e7f...",
    "itemHashes": ["0x2d4e7f...", "0x9f1a..."],
    "previousProofHash": "0x1c7b2e..."
  }
}

Verification Steps

1) Confirm Content Fingerprint Presence

Ensure contentHash is included in itemHashes.

javascript
const { contentHash, itemHashes } = webhookData.proof;
if (!itemHashes.includes(contentHash)) {
  throw new Error('Content fingerprint not found in proof set');
}

2) Confirm Receipt Fingerprint

Compare webhook proofHash with the receipt value you stored from emit.

javascript
if (webhookData.proof.proofHash !== storedReceiptId) {
  throw new Error('Proof fingerprint mismatch');
}

3) Check Continuity (Optional)

If you store prior proofs, compare previousProofHash.

javascript
if (storedPreviousProofHash &&
    webhookData.proof.previousProofHash !== storedPreviousProofHash) {
  throw new Error('Previous proof fingerprint does not match');
}

Verification Summary

CheckConfirms
itemHashes contains contentHashYour record is included
proofHash equals stored receipt valueReceipt proof matches
previousProofHash continuityCurrent proof follows the previously stored proof