Sending Urdu and Arabic WhatsApp Messages via API: The Technical Reality

If you are trying to send Urdu or Arabic messages to customers in Pakistan, India, or the Middle East using the WhatsApp Business API, you have probably already run into formatting errors. Text flips backward. Periods end up on the wrong side of the sentence. Your template gets rejected by Meta's automated moderation system for no clear reason. Or your system displays question marks instead of actual script.
This is not a simple copy-paste job. Sending right-to-left (RTL) languages through a JSON-based REST API requires specific handling of character encoding, formatting marks, and language codes. This guide covers the exact costs, formatting rules, and API payloads required to make this work without breaking your user experience.
The Real Cost: Conversation Categories and Local Rates
Meta does not charge you per message. They charge per 24-hour conversation window. The cost depends entirely on the country code of the recipient's phone number and the category of the message you send. Sending an Urdu message to a Pakistani number (+92) costs a different amount than sending the exact same message to an Indian number (+91) or a Saudi Arabian number (+966).
Meta splits conversations into four categories:
- Marketing: Promos, offers, and welcome messages. These are the most expensive.
- Utility: Order confirmations, shipping updates, and bills.
- Authentication: One-time passwords (OTPs) and verification codes.
- Service: Customer support conversations initiated by the user.
To see how this works in practice, look at the approximate rates for a 24-hour conversation window as of mid-2024. Rates fluctuate based on exchange rates and Meta's quarterly updates. You should always check the official Meta WhatsApp Pricing Directory for the exact, current rate card.
| Recipient Country | Marketing Rate (USD) | Utility Rate (USD) | Authentication Rate (USD) |
|---|---|---|---|
| Pakistan (+92) | $0.0473 | $0.0190 | $0.0113 |
| India (+91) | $0.0099 | $0.0042 | $0.0014 |
| Saudi Arabia (+966) | $0.0414 | $0.0180 | $0.0136 |
If you send a marketing template in Urdu to a Pakistani customer, you pay roughly 4.7 cents USD for that 24-hour window. If they reply, you do not pay extra for the reply. But if you send a utility message 25 hours later, a new conversation window opens, and you are charged the utility rate.
The UTF-8 Encoding Requirement
The WhatsApp Business API accepts payloads only in JSON format. JSON requires UTF-8 encoding. If your backend database, your middleware, or your code serializer uses Latin-1, Windows-1252, or any other legacy encoding, your Urdu and Arabic text will turn into gibberish.
When this happens, your API call might succeed with a 200 OK response, but the user will receive a string of square boxes, question marks, or random characters like السلام.
Always set your database connection collation to utf8mb4_unicode_ci (for MySQL/MariaDB) or ensure your PostgreSQL database is initialized with UTF8. When sending the HTTP POST request to the WhatsApp API endpoint, your headers must include:
Content-Type: application/json; charset=utf-8
Solving the RTL Layout Trap
Urdu and Arabic are written from right to left. However, the WhatsApp API payload is structured in JSON, which is read left to right. When you mix RTL text with Left-to-Right (LTR) elements—like English brand names, phone numbers, tracking links, or variables—the layout breaks on the user's phone.
Consider this sentence: "Your order 12345 is ready."
In Urdu, you might write: "آپ کا آرڈر 12345 تیار ہے۔"
If you pass this directly into your API payload, the number 12345 or the final period ۔ can jump to the wrong side of the line depending on whether the user is on an older Android device or an iOS device. This happens because the rendering engine does not know where the directionality changes.
Using Unicode Directional Formatting Marks
To force the phone's rendering engine to display the text correctly, you must use invisible Unicode control characters. The two most important are:
- Right-to-Left Mark (RLM): Unicode character
\u200F. This tells the renderer that the following text should be treated as right-to-left, even if it starts with a number or a Latin character. - Left-to-Right Mark (LRM): Unicode character
\u200E. Use this before you insert an English variable, a URL, or a phone number inside an Urdu/Arabic sentence.
If you are sending an OTP code like "9876" inside an Urdu message, format your payload string like this in your backend code before sending it to the API:
"\u200Fآپ کا تصدیقی کوڈ \u200E9876\u200F ہے۔"
This ensures the number reads as "9876" from left to right, but the surrounding Urdu text flows correctly from right to left, keeping the period at the far left of the completed sentence.
How to Construct the API Payload
To send a message, you must use the Cloud API or an authorized Business Solution Provider (BSP). If you use a BSP like WA Link, they provide their own routing layer, but the underlying template logic remains identical to Meta's standards. Note that WA Link handles the API connections and routing, but it cannot automatically fix your text directionality if you do not format your variables correctly in your database.
Before you can send a business-initiated message, you must register a template in your Meta Business Suite. You cannot send raw, free-form Urdu or Arabic text to a user who has not messaged you in the last 24 hours.
1. Registering the Template
When creating your template in the Meta developer portal, select the correct language code. This is a critical step. Do not register an Urdu template under the English (US) language code. If you do, the automated translation scanners will flag it as spam or mismatched content, leading to an immediate rejection.
- For Urdu, use the language code:
ur - For Arabic, use the language code:
ar
2. The API Request Payload
Once your template is approved, send a POST request to the Meta Graph API endpoint. Here is a clean, raw JSON payload example for an Urdu utility message with a tracking link and a dynamic name variable.
POST /v20.0/YOUR_PHONE_NUMBER_ID/messages HTTP/1.1
Host: graph.facebook.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "923001234567",
"type": "template",
"template": {
"name": "order_update_urdu",
"language": {
"code": "ur"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "عامر"
},
{
"type": "text",
"text": "98765"
}
]
}
]
}
}
In this template, the approved body text on Meta's servers would look like this:
سلام {{1}}، آپ کا آرڈر نمبر {{2}} بھیج دیا گیا ہے۔
When rendered on the user's phone, the variables will populate, and the message will read naturally from right to left.
When Urdu and Arabic API Messages are the Wrong Choice
Do not use Urdu or Arabic script for every scenario. In many cases, it will hurt your conversion rates or break your operations. Here is where we recommend avoiding it.
1. Roman Urdu vs. Script Urdu
In Pakistan, a vast majority of mobile users write Urdu using the Latin alphabet (e.g., "Kya hal hai?" instead of "کیا حال ہے؟"). This is called Roman Urdu.
If your target audience is young, tech-savvy, or uses low-end smartphones, script Urdu can sometimes feel overly formal or difficult to read on small screens. Low-end Android devices often use system fonts that render Nastaliq script poorly, falling back to a blocky Naskh font that looks unnatural to native Urdu readers.
If you decide to use Roman Urdu, register your templates under the English (en) language code. Meta does not have a language code for Roman Urdu. If you register it under ur, the review bot will reject it because it does not recognize the Latin characters as Urdu.
2. Complex Customer Support Routing
If you build an automated chatbot to handle customer support, do not try to build a complex NLP (Natural Language Processing) engine in script Urdu or Arabic unless you have a dedicated engineering team and a massive dataset.
Users type script Urdu in dozens of different ways, often mixing in English words written in Urdu script (like "کمپیوٹر" or "موبائل"). Standard intent parsers fail miserably here. Instead, use interactive quick-reply buttons. Let users tap buttons rather than typing out full sentences in script.
3. Cold Outbound Messaging
If you purchase a list of phone numbers in Pakistan or India and blast them with promotional Urdu messages, your number will be flagged and blocked within hours.
Because Urdu is highly personal, receiving an unsolicited marketing message in native script feels intrusive to users. They are far more likely to tap "Report Spam" than if they received a generic, professional English message. Keep script messages strictly opt-in.
Handling Font Issues on Desktop vs. Mobile
WhatsApp renders text differently depending on the operating system of the device.
On iOS, WhatsApp uses the system's default Arabic/Urdu fonts, which look clean and balanced. On Android, the rendering depends on the brand's custom skin (Samsung, Xiaomi, Vivo). Some of these skins do not support the Nastaliq style of writing, which is the preferred, flowing calligraphic style for Urdu. Instead, they display the text in Naskh, which is the standard flat style used for Arabic.
You cannot control this via the API. There is no CSS or styling parameter in the WhatsApp API payload. You must design your messages knowing that some users will see flat, Arabic-style lettering while others will see flowing Nastaliq. Keep your sentences short to prevent the text from wrapping awkwardly when fonts change.
Frequently Asked Questions
Why does my template get rejected even though the Urdu is grammatically correct?
Meta's automated review system is highly sensitive to medical, financial, and promotional terms. If you use words like "گارنٹی" (guarantee) or "منافع" (profit/interest), the bot will instantly flag the template. Try to use simple, conversational language, and avoid aggressive sales terms in your script.
Can I send PDFs or images with Urdu filenames?
No. Do not do this. If you send a media message (document or image) via the API and the filename contains non-ASCII characters (like Urdu or Arabic script), the API will often return a 400 Bad Request or the file will fail to download on the recipient's phone. Always name your media files using standard alphanumeric English characters (e.g., invoice_12345.pdf) even if the content inside the PDF is in Urdu.
How do I handle phone numbers inside Arabic text?
Phone numbers should always be written in international format (e.g., +923001234567). To prevent the numbers from flipping when placed next to Arabic or Urdu text, wrap the phone number in Left-to-Right Marks (LRM): \u200E+923001234567\u200E. This forces the phone to display the country code and digits in the correct order.
How long does it take for an Urdu template to be approved?
Template approval is automated. It typically takes anywhere from two minutes to two hours. If your template has been pending for more than 24 hours, delete it and submit it again with slightly altered wording, as it likely got stuck in a manual review queue.