Skip to main content
You can use the List Hooks API to reconcile your internal state with Posthook’s delivery records. This is useful for verifying that critical financial or compliance events were definitely sent.

Workflow

  1. List Completed Hooks:
    for await (const hook of posthook.hooks.listAll({
      status: 'completed',
      postAtAfter: '2025-01-01T00:00:00Z'
    })) {
      // Compare with your internal records
      console.log(hook.id, hook.path, hook.data);
    }
    
  2. Verify: Iterate through the list and compare against your own transaction logs.
  3. Alert: Flag any discrepancies (e.g., a transaction marked “processed” in your DB but missing a corresponding webhook).