# SMS to WhatsApp Failover: Building Multi-Channel Fallback

> How to send on one channel and fall back to another when a message is not delivered: timeouts, delivery reports, avoiding duplicates, OTP invalidation, and cost control.

Source: https://resalax.com/resources/sms-whatsapp-failover/
Language: English · Category: SMS engineering · Updated: 2026-11-09
Publisher: Resalax (https://resalax.com)

No single channel reaches every user every time. SMS fails when a phone is off or a route is congested; WhatsApp fails when a user has no data or no app. Fallback means you send on a primary channel, watch what happens, and use a second channel only when the first does not deliver. Done well, it recovers users without spamming them.

## The basic logic

1. Send the message on the **primary channel**.
2. Wait for a **delivery report**, up to a timeout that suits the message type.
3. If the message is **delivered**, stop.
4. If it **fails**, or no delivery report arrives before the timeout, send on the **secondary channel**.
5. Record which channel succeeded.

## Choose the primary channel per message type

| Message | Primary | Fallback | Timeout |
|---|---|---|---|
| Login or payment OTP | SMS | WhatsApp | 10–20 seconds, or when the user taps "Didn't get it?" |
| Order confirmation with buttons | WhatsApp | SMS | A few minutes |
| Delivery update | User's preferred channel | The other | Several minutes |
| Security alert | SMS | WhatsApp | 1–2 minutes |

SMS-first fits critical messages because it reaches every phone. WhatsApp-first fits messages that need a reply. See [SMS vs WhatsApp in Egypt](https://resalax.com/resources/sms-vs-whatsapp-egypt/).

## Fallback for OTPs

Codes need special care:

- **Generate a new code for the fallback message** and invalidate the old one. Two valid codes on two channels doubles the attack surface.
- **Tell the user where the new code went**: "We sent a new code to your WhatsApp."
- **Let the user trigger fallback** with a clear option, not only automatically. See [designing the OTP resend flow](https://resalax.com/resources/otp-resend-ux/).

## Avoid double messages

The biggest risk is that both channels deliver, and the user gets the same message twice. To limit it:

- Use timeouts that match real delivery times on the primary channel, measured per country. Too short and you fall back unnecessarily.
- Treat a **late delivered report** after fallback as information, not as a reason to send again.
- For non-urgent messages, use longer timeouts.

## Delivery reports are the trigger

Fallback depends on accurate, timely delivery reports. If a route returns reports late or not at all, your fallback either fires too often or never. Measure report latency per route, and handle webhooks idempotently. See [SMS delivery reports](https://resalax.com/resources/sms-delivery-reports-dlr/) and [SMS webhooks](https://resalax.com/resources/sms-webhooks-guide/).

## Consent and channel rules

- Use WhatsApp as a fallback only for users who opted in to WhatsApp messages. See [WhatsApp opt-in](https://resalax.com/resources/whatsapp-opt-in-best-practices/).
- Outside the 24-hour window, WhatsApp fallback needs an approved template. See [the 24-hour window](https://resalax.com/resources/whatsapp-24-hour-window/).
- Respect promotional time windows if the message is marketing.

## Measure the value

Track how many messages were delivered only because of fallback, by country and channel, and what they cost. In markets with uneven SMS delivery, fallback often recovers a meaningful share of OTPs that would otherwise have been lost.

> Resalax is built SMS-first with WhatsApp as the second channel on one API, so you can send on one and retry on the other. [See how it works](https://resalax.com/).
