WhatsApp Business API
MSG91's WhatsApp API — richer messages, higher open rates, and when to use it versus SMS.
Why First — The Scenario
You send a fee payment confirmation SMS. It arrives as a plain text message from "EDTRCK" — an unfamiliar name the parent has never saved as a contact. Most people glance at it and dismiss it. The open rate is decent, but the experience is generic.
Now imagine the same fee confirmation arriving on WhatsApp — from a verified business account with your school's name and logo. The message includes the fee receipt, a "View Details" button, and a "Contact School" button. The parent taps "View Details" and sees their full payment history. The entire interaction is richer, faster, and more trustworthy.
In India, WhatsApp has over 500 million users. For most people, it is their primary messaging app — more personal and more trusted than SMS. High-value notifications (fee payment confirmations, result announcements, enrollment notices) perform significantly better on WhatsApp.
WhatsApp vs SMS — When to Use Each
| Factor | SMS | |
|---|---|---|
| Open rate | 95%+ | 85% |
| Rich content | Images, buttons, PDFs, maps | Plain text only |
| Internet required | Yes | No |
| Cost | Per conversation (24-hour window) | Per message |
| Setup complexity | Higher (Facebook approval) | Lower |
| Works without smartphone | No | Yes |
| User already has app | 500M+ India users | Universal |
| Approval time | 1–4 weeks | 3–7 days |
Decision rule:
- Use WhatsApp for high-value messages where rich content adds value (fee payment confirmations, enrollment notifications, result announcements)
- Use SMS as fallback for users who do not use WhatsApp, or for critical OTP flows where internet dependency is a risk
- Always implement SMS as the fallback when WhatsApp delivery fails
Start With SMS
For your first project, get SMS working first. WhatsApp API approval takes longer and requires a Facebook Business Manager account. Once your product is live and working, add WhatsApp as an upgrade to the experience — not as the primary channel from day one.
What You Need Before Starting
WhatsApp Business API has more prerequisites than SMS. Gather these before beginning:
Facebook Business Manager Account
A verified Facebook Business Manager account for your company. Go to business.facebook.com — this is where WhatsApp API access is managed.
Verified Business
Facebook must verify your business. You'll need company documents (similar to DLT). This verification can take 1–2 weeks.
Phone Number
A clean phone number that has never been used with a personal WhatsApp account. If the number was ever used personally, you must delete that account first.
MSG91 Account
Your existing MSG91 account — MSG91 acts as the WhatsApp Business Solution Provider (BSP), handling the API layer.
Setup Process
Create Facebook Business Manager Account
Go to business.facebook.com and create a business account using the project Gmail address.
Fill in:
- Business name (official registered name)
- Business email
- Business website
Facebook may ask for business verification documents — PAN, GST, company registration.
Timeline: 3–14 days for verification depending on document quality.
Connect WhatsApp in MSG91
Once your MSG91 KYC is approved, go to WhatsApp → Connect in the MSG91 dashboard.
MSG91 walks you through a guided flow where you:
- Connect your Facebook Business Manager account
- Create a WhatsApp Business Profile (display name, logo, description, business category)
- Register your phone number (the clean number you prepared)
- Verify the number via OTP
MSG91 submits the API access request to Meta (Facebook) on your behalf.
Timeline: 1–7 days for API access approval.
Create WhatsApp Message Templates
WhatsApp templates work like DLT templates — every message must use a pre-approved template. You cannot send free-form text outside of the 24-hour conversation window.
In MSG91 → WhatsApp → Templates → Create Template:
| Field | Description |
|---|---|
| Template Name | Internal identifier (e.g. fee_payment_confirmation) |
| Category | Utility (transactional) / Marketing / Authentication |
| Language | English, Hindi, Telugu, etc. |
| Header | Optional image, document, or text header |
| Body | Main message text with {{1}}, {{2}} variable placeholders |
| Footer | Optional small text below message |
| Buttons | Up to 3 buttons: Quick Reply, Call to Action (URL or phone) |
Template approval: 24–72 hours (Meta reviews all templates).
Build Your WhatsApp Profile
Before sending messages, complete your WhatsApp Business profile in MSG91:
- Display Name: Your official business name as it appears to users
- Profile Photo: Company logo (500×500 px, PNG)
- Business Description: 1–2 lines about what you do
- Business Category: Home Services / Cleaning / etc.
- Business Hours: When users can expect responses
- Website: Your app URL or company website
A complete, verified profile builds user trust. Messages from unverified/incomplete profiles look suspicious.
WhatsApp Template Examples for a School Management App
Sending WhatsApp Messages from an Edge Function
The Conversation Window — Important Concept
WhatsApp distinguishes between two messaging modes:
Within 24 hours of user message: You can send any message, including free-form text (not just templates). This is a customer service conversation.
After 24 hours (or no prior user message): You can ONLY send pre-approved template messages. This is the outbound notification flow.
For fee payment confirmations and result notifications (which are unprompted by the user), you will always be in the template-only mode. This is why template pre-approval is mandatory.
Conversation Pricing
WhatsApp Business API charges per 24-hour conversation (not per message). A conversation starts when you send a template message. All messages within the next 24 hours from either side are part of that conversation and do not cost extra. Budget accordingly for high-volume apps.
SMS + WhatsApp: The Right Combination
For production apps serving Indian users, the recommended setup is:
- Primary: WhatsApp (richer, higher engagement)
- Fallback: SMS (when WhatsApp delivery fails or user does not use WhatsApp)
Required Secrets for WhatsApp
Next Step
Move to the Verification Checklist to confirm you have understood and set up everything in this module correctly.