IOSOR Learn
Validating DLR Webhook Idempotency Keys During Provider Migration
Verify stable idempotency keys across old and new SMS providers to prevent duplicate or missed delivery receipts during cutover, then compare partner routes via Decision Brief.
Lead Telecom & Routing Architect · Lausanne, CH
Engineers must confirm that every delivery receipt webhook carries a stable, globally unique idempotency key that survives provider migration, enabling exactly-once processing and preventing duplicate billing or missed events during cutover.
1. Idempotency Key Contract Definition
Agree on a canonical key format (e.g., `provider|message_id|timestamp`) shared by both legacy and new gateways. Require the key to be immutable per DLR event, case-sensitive, and length-bounded (≤128 chars). Document the contract in the migration runbook and enforce it via schema validation on ingest.
2. Cross-Provider Key Stability Testing
Replay a representative DLR sample through both providers in shadow mode. Verify that identical message submissions produce identical idempotency keys. Flag any provider that mutates message IDs, truncates timestamps, or injects non-deterministic salts. Capture discrepancies in a migration discrepancy log for rollback decisions.
During pre-flight verification, validate that automatic failover thresholds trigger deterministic rerouting without duplicating outbound segments or exhausting retry backoff budgets under peak regional load.
3. Deduplication Window & Storage Sizing
Define the deduplication lookback window (typically 72 hours) and provision a high-throughput key store (Redis, DynamoDB) with TTL matching the window. Load-test the store at 3× peak DLR volume to confirm sub-5 ms `SETNX` latency. Monitor key collision rate; it must remain <0.001 %.
4. Webhook Signature & Replay Consistency
Ensure each provider signs webhooks with a rotating HMAC key published via JWKS. Validate signatures before idempotency checks. Use the replay endpoint to verify that re-delivered webhooks present the same key and signature, confirming at-least-once delivery without double-counting.
5. Cutover Validation Checklist
- Confirm key contract parity in staging.
- Run 24-hour shadow traffic with dual-write deduplication.
- Verify zero duplicate `message:delivered` events in analytics.
- Related: DLR Deduplication Strategy Cutover, Webhook Replay Consistency Validation, Validating DLR Webhook Ordering Guarantees During Cutover.
6. Start with IOSOR
Compare verified partner routes for your corridor and channel using the Decision Brief: Decision Brief. Verify that identical message submissions produce identical idempotency keys. Flag any provider that mutates message IDs, truncates timestamps, or injects non-deterministic salts.
IOSOR takeaway
Use the replay endpoint to verify that re-delivered webhooks present the same key and signature, confirming at-least-once delivery without double-counting. Compare verified partner routes for your corridor and channel using the Decision Brief: Decision Brief.
Was this guide helpful?
Related guides
- Verifying Suppression List Portability Before Migration Cutover
Pre-cutover checks for opt-outs, bounces, complaints, and consent suppressions: export/import fidelity, DLR and webhook evidence, and partner route comparison.
- Stale Webhook Endpoint Replay Safety During Provider Migration
Decide if legacy webhook endpoints can replay or re-emit events after cutover without duplicating downstream actions, then compare partner webhook and DLR semantics.
- Sender ID Ownership Continuity Audit Before Cutover
Verify alphanumeric sender IDs, short codes, and originating numbers keep ownership proof and carrier registration parity across providers before any message leaves the new route.












