IOSOR Learn
OTP Webhook Replay Timestamp Validation Gate
Validate webhook timestamp freshness to block replay attacks by enforcing strict skew tolerance and replay window limits across verified partner routes.
Lead Telecom & Routing Architect · Lausanne, CH
Engineers must verify that every inbound OTP webhook carries a timestamp within an acceptable skew window and that the replay window is strictly enforced to reject duplicate or delayed payloads. This gate ensures timestamp validation logic is consistent, measurable, and aligned with partner route capabilities.
Timestamp Skew Tolerance Definition
Define the maximum allowed difference between the webhook timestamp and the receiver's clock, typically 30–60 seconds, to account for network latency and clock drift. Any webhook outside this window is rejected immediately. Document the exact skew value per partner route and enforce it at the ingestion layer before any business logic executes.
Replay Window Enforcement Logic
Implement a sliding replay window (e.g., 5 minutes) during which a webhook with the same message ID and timestamp combination is accepted only once. Store recent message IDs with their timestamps in a fast lookup store (Redis, in-memory LRU) and reject duplicates within the window. Ensure the window duration matches the partner's guaranteed delivery SLA.
Clock Synchronization Verification
Confirm that all systems processing webhooks (API gateways, workers, databases) synchronize time via NTP or PTP with a stratum ≤ 3 source. Log clock offset metrics continuously and alert on drift > 100 ms. Partner routes must provide timestamp sources traceable to the same time hierarchy to avoid systematic skew.
Webhook Payload Timestamp Format Standards
Require ISO 8601 UTC timestamps with millisecond precision (e.g., 2024-01-15T10:30:45.123Z) in every webhook. Reject payloads with missing, malformed, or non-UTC timestamps. Validate format at the schema layer (JSON Schema, Protobuf) before timestamp logic runs. Partners must document their timestamp format in the integration spec.
DLR and Webhook Correlation Checks
Cross-reference delivery receipt (DLR) timestamps with webhook timestamps for the same message ID. Flag discrepancies > skew tolerance as potential replay or clock issues. Use this correlation to tune skew values per partner and detect silent clock drift. Log correlated pairs for audit and partner review.
Start with IOSOR
Compare verified partner routes for timestamp skew tolerance, replay window enforcement, and clock sync guarantees using the IOSOR partner comparison tool: Compare fraud routes. Validate your timestamp gate against live partner specs and adjust skew/window values per corridor. See also: Timestamp Skew Detection, Replay Window Verification, Replay Window Enforcement.
IOSOR takeaway
Define the maximum allowed difference between the webhook timestamp and the receiver's clock, typically 30–60 seconds, to account for network latency and clock drift. Log correlated pairs for audit and partner review (/tools/brief · DLR / webhook).
Was this guide helpful?
Related guides
- OTP Velocity Cap Drift Detection: Verify Route Failover Before Abuse Escalates
Detect silent per-route OTP velocity cap drift, audit DLR and webhook evidence, and compare failover-ready partner routes before abuse spikes hit your funnel.
- Verifying OTP Delivery Receipts Against Forged Success Signals
How ops leads test whether DLR and webhook success signals are auditable before trusting OTP conversion and fraud dashboards, and pick routes with receipt integrity.
- OTP Velocity Fencing: Auditing Threshold Drift Before It Leaks Fraud
How to audit per-account, per-number, and per-IP OTP velocity fences for silent threshold drift after rule changes, traffic mix shifts, or partner filter updates.












