Getting Started with WhatsApp Business API in Africa
Guides

Getting Started with WhatsApp Business API in Africa

Ping TeamJanuary 18, 202611 min read

WhatsApp is the dominant messaging app across Africa, with penetration rates exceeding 90% in many markets. The WhatsApp Business API allows businesses to send notifications, provide customer support, and run marketing campaigns at scale. Ping simplifies access to this API by handling the infrastructure, number provisioning, and Meta compliance requirements.

Understanding WhatsApp Business API Basics

The WhatsApp Business API operates on two message types. Template messages are pre-approved messages that you can send to users at any time, including those who have not recently messaged you. Session messages are free-form messages that can only be sent within a 24-hour window after a user messages your business number. Understanding this distinction is critical for planning your messaging strategy.

Setting Up with Ping

  • Create a Ping account and complete business verification.
  • Navigate to the WhatsApp section in your dashboard.
  • Connect your Facebook Business Manager account.
  • A WhatsApp Business number will be provisioned for you.
  • Submit your first message template for Meta approval.
  • Generate an API key with WhatsApp permissions.

Creating Template Messages

Template messages must be submitted to Meta for approval before use. Templates support variables (e.g., {{1}} for customer name), header images, and call-to-action buttons. Approval typically takes 24-48 hours. Focus on utility templates first (order confirmations, appointment reminders) as these have the highest approval rates.

javascript
// Send a WhatsApp template message via Ping
const response = await fetch('https://api.ping.co.zw/api/whatsapp/template', {
  method: 'POST',
  headers: {
    'x-api-key': 'pk_live_your_key_here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    to: '+263771234567',
    templateName: 'order_confirmation',
    templateLanguage: 'en',
    components: [
      {
        type: 'body',
        parameters: [
          { type: 'text', text: 'Tatenda' },
          { type: 'text', text: 'ORD-2026-0042' },
        ],
      },
    ],
  }),
});

Session Messaging for Customer Support

When a customer sends a message to your WhatsApp Business number, a 24-hour session window opens. During this window, you can send free-form text, images, documents, and interactive messages without using a pre-approved template. This is ideal for customer support conversations. Ping automatically tracks session windows so you know when you need to switch to templates.

Keep your WhatsApp quality rating high by ensuring users have opted in, responding to messages quickly, and avoiding template messages that feel like spam. A low quality rating can restrict your messaging volume.

Set Up WhatsApp API

Get Started