Automating WhatsApp Prescription Refills for Indian and Pakistani Pharmacies

·7 min read
Automating WhatsApp Prescription Refills for Indian and Pakistani Pharmacies

Imagine a busy Tuesday afternoon at a pharmacy in Bahadurabad, Karachi, or Karol Bagh, New Delhi. The phone is ringing. Three customers are waiting at the counter. One of your staff members is squinting at a paper logbook, trying to find a patient's file. The patient, an elderly man named Uncle Rehman, ran out of his blood pressure medication two days ago. He forgot to buy more. Now his family is frantic because his blood sugar or blood pressure has spiked, and they have to rush him to the clinic.

This happens every day.

You try to fix it by sending manual SMS alerts. But SMS inbox folders are full of spam from real estate agents and clothing brands. Your messages get lost. You try calling, but your staff has to dial 40 numbers a day. Half the time, nobody answers. The staff gets tired, and the calls stop.

Then you think about WhatsApp. Everyone in India and Pakistan opens WhatsApp multiple times a day. It seems like the perfect solution. But how do you actually set up prescription refill reminders without getting your number blocked or spending a fortune?

The Three Ways to Send WhatsApp Reminders

You cannot just start blasting messages from your personal phone. WhatsApp will block your number within hours. Let us look at the three actual methods you can use to send these alerts, along with the honest pros and cons of each.

MethodSetup DifficultyRisk of Number BanApproximate CostBest For
WhatsApp Business App (Manual)Very EasyHigh (if abused)FreePharmacies with under 15 regular patients
Unofficial APIs (Web Scraping)MediumExtremely HighCheap monthly subscriptionNot recommended for any professional business
Official WhatsApp Cloud APIHigh (requires developer)Very Low (if compliant)Pay-per-conversation ratesGrowing pharmacies and chains

1. The WhatsApp Business App (Manual)

You download the free WhatsApp Business app on a cheap Android phone. Your staff manually checks the ledger every morning, types out a message, and sends it to each patient.

It is slow. If you send the same copypasted message to 50 people who do not have your pharmacy's number saved in their contacts, WhatsApp will flag your account. Some patients will report you as spam because they did not ask for the message. Your number gets banned. You lose your entire customer chat history. Do not do this if you run a serious business.

2. Unofficial WhatsApp APIs (Web Scraping)

You find a cheap provider online offering "unlimited WhatsApp messages" for a flat monthly fee. These systems use automated software to control a WhatsApp Web session on a virtual server.

This violates Meta’s Terms of Service. Meta constantly updates their code to detect these bots. Your channel will work fine for three weeks, and then suddenly, your number is permanently banned. You cannot appeal this ban. For a pharmacy, losing your main contact number is a disaster. It breaks the trust you built with your neighborhood.

3. The Official WhatsApp Cloud API

This is the official route provided by Meta. You connect your pharmacy database directly to Meta's servers. It requires some technical work to set up, and you have to pay Meta for every conversation. But it is legal, your number will not get banned for sending automated messages (as long as patients have opted in), and you can send thousands of reminders in seconds.

Understanding the Real Costs

Meta does not charge per individual message. They charge per 24-hour conversation window. A conversation starts when your template message is delivered to the patient's phone.

For prescription reminders, you must use "Utility" templates. These are cheaper than marketing templates. Meta's pricing varies by country. A utility conversation in India costs a different amount than in Pakistan. To see the exact, up-to-date rates for your specific country, you must check the official Meta developer documentation at developers.facebook.com/docs/whatsapp/pricing.

Generally, these costs are low. If a single customer buys their chronic medicine because of your reminder, that purchase easily pays for hundreds of messages.

The Step-by-Step Technical Setup

To build an automated system, you need to connect your pharmacy management system (PMS) or local database to the official WhatsApp API.

Step 1: Get Your Technical Assets Ready

You need a clean phone number that does not have an active WhatsApp personal or business account. If it does, you must delete that account first. You also need a Meta Business Manager account and a verified business.

Go to developers.facebook.com, register as a developer, and create a new App. Select "Other" then "Business" as your app type. Add the WhatsApp product to your app.

Step 2: Verify Your Pharmacy Business

Meta requires business verification to increase your messaging limits. You will need to upload your pharmacy registration documents. In Pakistan, this is usually your drug license and NTN certificate. In India, it is your GST registration or drug license.

Make sure the name on your documents matches the name on your Meta Business Manager account exactly. If your document says "Al-Shifa Pharmacy" and your Meta account says "Al Shifa Medical Store", Meta will reject your application.

Step 3: Create and Approve Your Template

You cannot type whatever you want in an automated message. Meta must approve your template first. Keep the language professional. Do not use promotional words like "discount" or "sale" in a utility template, or Meta will classify it as "Marketing," which costs more.

Here is a template that works well for pharmacies:

"Hello {{1}}, your prescription for {{2}} is due for a refill on {{3}}. Would you like us to prepare your order for pickup at our {{4}} branch? Please reply with 'YES' to confirm or 'NO' to cancel."

Step 4: Writing the Code to Trigger the Message

Your developer needs to write a script that queries your pharmacy database every morning. The script looks for patients whose last purchase was 25 days ago (assuming a 30-day supply).

When it finds them, it sends an HTTP POST request to the WhatsApp API. Here is a realistic JSON payload example so your developer knows exactly what this looks like:

{
  "messaging_product": "whatsapp",
  "to": "923001234567",
  "type": "template",
  "template": {
    "name": "prescription_refill_reminder",
    "language": {
      "code": "en"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          { "type": "text", "text": "Mr. Khan" },
          { "type": "text", "text": "Glucophage 500mg" },
          { "type": "text", "text": "October 24th" },
          { "type": "text", "text": "Clifton" }
        ]
      }
    ]
  }
}

The recipient's phone number must include the country code (92 for Pakistan, 91 for India) without any plus sign (+) or leading zeros.

Mistakes You Must Avoid

Setting up the API is only half the battle. If you make these common operational mistakes, your system will fail or get blocked.

Ignoring Opt-Outs

If a customer replies "Stop" or "Don't message me," you must instantly flag their phone number in your database to prevent future messages. If you keep messaging them, they will click "Report Spam" in WhatsApp. If your spam rate goes above 0.1%, Meta will downgrade your phone number's quality rating, limit your daily messages, or suspend your account. Always include a clear opt-out option or button.

Exposing Sensitive Medical Information

Do not list highly sensitive diagnoses in the message. Sending "Your HIV medication is ready" is a massive privacy violation if someone else looks at the patient's phone screen. Keep it discreet. Use terms like "your regular prescription" or just the brand name of the medicine if the patient has agreed to it. In India, this is especially important under the Digital Personal Data Protection (DPDP) Act.

Bad Timing

Do not run your automated scripts at midnight. Your database queries should run at a civilized hour, like 10:00 AM. If a database query runs late or gets stuck in a loop, make sure your code has a safety check to pause sending after 8:00 PM.

Where WA Link Fits In

If setting up Meta’s APIs directly feels too complex, you can use our service at WA Link. We provide a simplified API layer. Instead of dealing with Meta's complex webhook verification and JSON structures, you can send messages using our straightforward API endpoints.

However, you should know what we do not do. WA Link does not build your pharmacy database. We do not write the SQL query that finds which patients need refills. You still need a developer or an IT person to connect your software to our gateway.

Frequently Asked Questions

Do we need a verified green tick to send refill reminders?

No. The green tick (Official Business Account status) is only for brand recognition. Any business with a verified Meta Business Manager can send automated reminders using the API. Your pharmacy name will show up in the chat header even without the green tick, as long as the user has saved your number or you are using the official API.

What happens if a patient replies to the message?

If a patient replies, the 24-hour window becomes a "Service" conversation. You can route this reply to a live chat dashboard so your pharmacists can answer questions, accept prescription photos, or coordinate home delivery. You will need to set up a webhook to receive these incoming messages.

Can we attach a PDF of the bill or invoice?

Yes. You can send media templates that contain PDF attachments. This is useful if you want to send a pre-invoice so the patient knows the exact cost of their medicine before they arrive at the store or before the delivery rider reaches their house.

How do we handle patients who do not use WhatsApp?

Your system should check if the message was delivered. The WhatsApp API sends a webhook status of "sent", "delivered", and "read". If the status does not change to "delivered" within 4 hours, your system should fall back to a standard SMS. This ensures you do not miss patients who still use basic feature phones.

Start a free trial