IOSOR Learn
WhatsApp RCS Message ID Deduplication Gate
Verify deduplication logic across WhatsApp and RCS to prevent duplicate billing and delivery. Confirm idempotency key handling, retry semantics, and webhook contract alignment via partner route comparison.
Lead Telecom & Routing Architect · Lausanne, CH
Operators must ensure every outbound message across WhatsApp and RCS carries a stable idempotency key that survives retries, carrier handoffs, and webhook replays. Duplicate message IDs trigger double billing and recipient spam; the gate validates that each channel respects the same deduplication window and acknowledgment contract.
Idempotency Key Schema and Scope
Define a canonical key format combining E.164 recipient, channel identifier, template namespace, and a monotonic sequence or UUID. WhatsApp Business API uses message_id; RCS uses messageId or chatId depending on carrier. Map both into a single namespace so the deduplication store sees one logical key per user intent. Reject any submit where the key already exists within the configured TTL.
Deduplication Window and TTL Alignment
WhatsApp typically acknowledges within seconds; RCS carrier latencies can stretch to minutes. Set the deduplication TTL to cover the 99th percentile round-trip across both channels — usually 10–15 minutes. Expire keys only after final DLR (delivered/failed) or explicit webhook timeout. Do not evict on first ACK; a late carrier retry must still hit the gate.
Retry Semantics and Backoff Contract
Partner retries must preserve the original idempotency key. WhatsApp retries on 429/5xx with exponential backoff; RCS carriers may retry on transient SS7/SIGTRAN errors. Document each partner's max retry count, backoff curve, and whether they mutate the message payload. The gate blocks any retry that alters template parameters or media hashes while keeping the same key.
Webhook Contract and DLR Reconciliation
Normalize inbound webhooks to a common envelope: key, channel, status, timestamp, carrier_code, error_class. WhatsApp sends status callbacks; RCS delivers DLR via SMPP or HTTP. Reconcile both streams against the deduplication store. Flag any duplicate delivered events for the same key — these indicate a partner-side bug or a replay attack. Cross-reference with the DLR latency and read-receipt reconciliation guides.
Inbound Replay Defense and Signature Verification
Attackers can replay signed webhooks to force duplicate processing. Verify HMAC signatures per channel (WhatsApp X-Hub-Signature-256, RCS carrier-specific JWS). Enforce nonce or timestamp freshness windows. Store processed webhook hashes for the same TTL as the deduplication key. Reject replays before they reach the billing pipeline. See the inbound webhook replay defense article for implementation patterns.
Start with IOSOR
Compare verified partner routes for WhatsApp and RCS deduplication behavior using the partner route comparison. Confirm each route's idempotency key handling, retry limits, webhook signature method, and DLR latency SLA before routing production traffic.
Related: balance reservation before first debit · Wallet stop-lines before production.
IOSOR takeaway
Define a canonical key format combining E.164 recipient, channel identifier, template namespace, and a monotonic sequence or UUID See the inbound webhook replay defense article for implementation patterns (/tools/brief · DLR / webhook).
Was this guide helpful?
Related guides
- WhatsApp Template Category Approval vs RCS Route Parity Check
Verify WhatsApp template category approvals stay aligned with RCS agent capability declarations across every route desk before scaling a mixed campaign.
- Verify Bounce Webhook Classification and SLA Enforcement Gate on WhatsApp/RCS Routes
Check bounce webhook classification, DLR receipt mapping, and SLA enforcement gates on WhatsApp/RCS before raising volume, then compare partner routes in /tools/brief.
- Verify RCS Fallback Timeout Budget and Circuit Breaker Test on WhatsApp-RCS Routes
Run the RCS fallback timeout budget and circuit breaker test on WhatsApp-RCS routes before raising volume, then compare partner routes in /tools/brief.












