Skip to main content

WhatsApp Quickstart

MALIPOPAY gives you the WhatsApp Business Platform through the same API key you already use for payments. Send order confirmations, delivery updates, receipts and OTPs from your own business number, and receive replies.

Base URL and auth are unchanged:

https://core-prod.malipopay.co.tz/api/v1/waba
apiToken: YOUR_API_KEY

The one rule that governs everything

WhatsApp is not SMS. You cannot message anyone you like, whenever you like.

  • Outside a conversation, you may only send a template that Meta has reviewed and approved.
  • Once a customer replies, a 24-hour service window opens and you may send free text.
  • When the window closes, you are back to templates.

Almost every "the message never arrived" report is a free-text send outside an open window. See Conversations.

Step 1: Connect a number

In the dashboard, go to WhatsApp → Numbers and connect your business number through Meta's embedded signup. You will need access to the number to enter the verification code Meta sends, and Meta reviews your display name separately, which can take a while and can be rejected.

Two things to know before you start:

  • The number must not already have a WhatsApp account on it. If it does, delete that account first (WhatsApp → Settings → Account → Delete account) and wait a few minutes, or use Meta's migration flow.
  • If you do not connect your own number, sends fall back to the shared MALIPOPAY platform number. That works, but your customers see MALIPOPAY rather than you.

Check what you have connected:

curl https://core-prod.malipopay.co.tz/api/v1/waba/phone-numbers \
-H "apiToken: YOUR_API_KEY"

Step 2: Get a template approved

Create the template in WhatsApp → Templates, or over the API:

curl -X POST https://core-prod.malipopay.co.tz/api/v1/waba/templates \
-H "apiToken: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "order_confirmation",
"language": "en",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}, we have received your payment of TZS {{2}}. Your order {{3}} is confirmed.",
"example": { "body_text": [["John", "50,000", "ORD-001"]] }
}
]
}'

Templates start PENDING and must reach APPROVED before you can send them. Meta's rules are strict and the common rejections are avoidable. See Templates.

Step 3: Send it

curl -X POST https://core-prod.malipopay.co.tz/api/v1/waba/messages/template \
-H "apiToken: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "255712345678",
"templateName": "order_confirmation",
"language": "en",
"variables": { "1": "John", "2": "50,000", "3": "ORD-001" }
}'

A 202 means MALIPOPAY accepted it and handed it to Meta. Delivery is confirmed later by webhook.

Step 4: Receive replies

Point a webhook at your server to receive inbound messages and delivery statuses. See WhatsApp Webhooks.

What it costs

WhatsApp is billed per 24-hour conversation, not per message, at Meta's per-category rates plus the MALIPOPAY margin. Sending five messages inside one open window costs one conversation. Categories are MARKETING, UTILITY, AUTHENTICATION and SERVICE, and they are priced differently.

Charges come off your MALIPOPAY wallet at send time, and are refunded automatically if Meta rejects the send. Your own rollup:

curl https://core-prod.malipopay.co.tz/api/v1/waba/billing/conversations \
-H "apiToken: YOUR_API_KEY"

Next steps