Skip to content

PHP · Laravel · WordPress

Send WhatsApp messages from PHP and Laravel

Plain PHP cURL, Laravel's Http facade or Guzzle — if your app can make an HTTPS request, it can send WhatsApp messages. Perfect for e-commerce order alerts, school systems and M-Pesa receipts.

  • From Ksh 500/month
  • No per-message fees
  • Pay with M-Pesa
2 min
from sign-up to first message
Ksh 500
a month, no per-message fees
10,000
recipients per bulk campaign
M-Pesa
pay by STK push, in shillings

Send a WhatsApp message in PHP

Works on any PHP 7.4+ host, including shared hosting.

  1. No package required. Use PHP's built-in cURL extension. Nothing to composer-install.
  2. Laravel friendly. Http::withToken(env('WAVELINK_KEY'))->post(...) — queue it in a job for high volume.
  3. Hook into M-Pesa callbacks. Send a WhatsApp receipt the moment your Daraja or payment callback confirms a payment.
  4. WordPress & WooCommerce. Call the API from an order-status hook to send order updates automatically.
$ch = curl_init("https://wavelink.co.ke/api/v1/messages");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer wl_live_...",
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "to" => "254712345678",
    "text" => "Your order #1042 has been dispatched 🚚",
  ]),
]);
$data = json_decode(curl_exec($ch), true);
Full API reference

Frequently asked questions

Still unsure? Read the docs or try it free — it takes two minutes.

How do I send a WhatsApp message in Laravel?

Use the Http facade: Http::withToken(env('WAVELINK_KEY'))->post('https://<your-domain>/api/v1/messages', ['to' => '254712345678', 'text' => 'Hello']). For large volumes, dispatch it from a queued job or use the bulk endpoint.

Does it work on shared hosting?

Yes. Any host with PHP's cURL extension and outbound HTTPS can call the API — no long-running process or socket connection is needed on your side.

Can I send a WhatsApp message after an M-Pesa payment?

Yes. In your M-Pesa (Daraja) callback handler, once the payment is confirmed, call the messages endpoint with the customer's phone number and a receipt text.

Is there a free trial?

Yes. Every new account gets a 7-day free trial with all features, including the API, bulk campaigns, webhooks and the inbox. No card is needed to start.

Keep reading

Send your first WhatsApp message in two minutes.

7-day free trial, every feature included. Pay with M-Pesa when you are ready.

Create your free account