IOSOR Learn
Verification Result Webhook Idempotency and Replay Audit
Audit verification result webhooks for idempotency, replay safety, and retry contracts so duplicate callbacks and out-of-order events never corrupt identity state or billing.
Lead Telecom & Routing Architect · Lausanne, CH
Verification result webhooks must be idempotent and replay-safe: every callback carries a stable event ID, duplicate deliveries collapse to one state transition, and out-of-order events cannot overwrite newer identity or billing records. Audit these guarantees before switching partner routes.
Map the callback surface and event identity
Start by enumerating every verification result callback your stack accepts: final Verify OK, failure, timeout, and intermediate status events. For each, record the event ID field, the verification request ID, the timestamp, and the signature header. Confirm the event ID is generated by the sender and stable across retries — not derived from payload hash alone.
Test idempotency under duplicate delivery
Replay the same callback five times in quick succession and verify the identity state transitions exactly once. Check that billing counters, credit consumption, and status flags do not increment per delivery. Then replay with a mutated payload but the same event ID: the system must reject or ignore the mutation rather than apply it.
Audit ordering and late-arrival handling
Out-of-order events are the hardest failure mode. Simulate a late success arriving after a timeout, and a retry arriving after a newer terminal state. The handler must compare event timestamps or sequence numbers and refuse to regress a terminal state. Verify that late arrivals are logged with their original timestamp, not the receipt time, so audit trails remain truthful.
Validate retry contracts and DLR receipts
Inspect the retry contract: backoff schedule, maximum attempts, and whether retries reuse the same event ID. Cross-check against DLR receipts for the underlying SMS or verification message — a DLR marked delivered with no corresponding result callback signals a lost event, not a pending one. Measure webhook latency from event generation to your handler and set alert thresholds.
Reconcile identity state and billing after replay
After every replay drill, reconcile three stores: identity state, billing ledger, and the audit log. Each verification request must map to exactly one terminal outcome and one billing line. Flag any request with multiple terminal events, zero terminal events past the retry horizon, or billing lines without a matching event ID. Run this reconciliation daily during migration and weekly afterward.
Start with IOSOR
Run the partner route comparison at compare verified partner routes with this checklist: stable event ID present; deduplication window exceeds retry horizon; terminal-state regression blocked; late arrivals logged with original timestamps; retry schedule documented; DLR-to-callback correlation verified; replay or reconciliation endpoint available; latency thresholds set.
Related: PAYG hold before first debit · Wallet stop-lines before production.
IOSOR takeaway
Start by enumerating every verification result callback your stack accepts: final Verify OK, failure, timeout, and intermediate status events. Run this reconciliation daily during migration and weekly afterward (/tools/brief · DLR / webhook).
Was this guide helpful?
Related guides
- Verify API Key Scope Rotation Observability Matrix on tfc-verify Routes
Operators verify API key scope, rotation cadence, and observability matrix on tfc-verify routes before raising volume, then compare partner routes in /tools/brief.
- Verification Result Cache TTL and Staleness Gate Audit
Audit cache TTL, invalidation webhooks, and freshness SLAs for email, phone, and identity verification results before re-querying to balance cost against stale-risk exposure.
- Identity Proofing Step-Up Escalation Thresholds: A Verification Audit
Audit where passive verification stops being sufficient, define step-up trigger thresholds, and compare verified partner routes on escalation accuracy and false-step-up cost.












