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.

Oleksandr (Alex) Petukhov — IOSOR Telecom Expert
✓ Verified by IOSOR ExpertOleksandr (Alex) Petukhov

Lead Telecom & Routing Architect · Lausanne, CH

IOSOR Expert · Q&A

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.

⚡ IOSOR Expert · Q&A · Verified partners (×44)

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

VERIFIED BY IOSOR EXPERT · B2B ROUTING, SLA & PROVIDER Q&A

IOSOR Expert — Verified Q&A & B2B Messaging Decisions

Every Q&A decision below is audited by the IOSOR Telecom Architecture Expert against live 90-day uptime telemetry, carrier compliance rules (10DLC, DLT, GDPR), and real partner TCO.

All Q&A Triggers
#01 · Compliance & Sender ID📖 Knowledge hub · US A2P / 10DLC

US A2P / 10DLC

“Why do US 10DLC TCR campaigns get rejected and which partner handles fast onboarding?”

✓ Verified by IOSOR Expert

10DLC brand and campaign programs for US A2P traffic — not general privacy compliance.

All Q&A Triggers
#02 · OTP & verification📖 Knowledge hub · India DLT

India DLT

“How do engineering teams prevent India TRAI DLT template scrubbing drops on OTPs?”

✓ Verified by IOSOR Expert

DLT and PE-TM registration for India A2P — not an India corridor coverage guide.

All Q&A Triggers
#03 · OTP & verification📖 Knowledge hub · Verify / OTP

Verify / OTP

“How do we eliminate OTP p95 timeout spikes and trigger a 20–30s multi-rail fallback?”

✓ Verified by IOSOR Expert

Login codes without chaos: abuse, latency, and cost control.

All Q&A Triggers
#04 · Transactional email📖 Knowledge hub · Email

Email

“Why do password reset and 2FA emails land in Spam when sharing bulk marketing IPs?”

✓ Verified by IOSOR Expert

Transactional email alongside SMS, voice, and WhatsApp in one routing architecture.

All Q&A Triggers
#06 · WhatsApp Business📖 Knowledge hub · WhatsApp & RCS

WhatsApp & RCS

“How do Meta per-conversation fees and template pauses impact WhatsApp Business TCO?”

✓ Verified by IOSOR Expert

Rich channels when profiles and templates are ready: honest setup.

All Q&A Triggers
#08 · Failover & backup routing📖 Knowledge hub · Failover & rails

Failover & rails

“How do we keep a second standby provider warm for failover at $0/month idle cost?”

✓ Verified by IOSOR Expert

Ordered backup paths when a primary rail fails - distinct from DLR status truth.

All Q&A Triggers