WhatsApp Business API: Integration, Notifications, Chatbots
Clients message you on WhatsApp, and you reply in days—or not at all. Orders are lost, support is overwhelmed. According to statistics, up to 60% of users prefer messengers for business communication (Statista Consumer Survey, 2023), and the average response time on WhatsApp is under 5 minutes. We solve this: we integrate the WhatsApp Business API with your website so that order status notifications, responses to inquiries, and chatbots work flawlessly. Our experience: over 5 years in communication solutions, dozens of successful projects, including for high-turnover online stores. The implementation pays for itself within 2–3 months on average—for a store sending 10,000 messages per month, direct Cloud API costs ~$50, while BSP would be ~$150. Support load drops by 40%.
What problems does the WhatsApp Business API solve?
Typical mistakes in self-integration:
- Template verification: without properly formatted templates, you can't send outbound notifications. We prepare templates that pass Meta moderation on the first try—30% of projects get stuck at this stage.
- 24-hour window: many forget that free-form messages can only be sent within a session. Ignoring this leads to a 24-hour phone block. We configure correct session management.
- Webhooks and queues: incoming messages need to be processed asynchronously, otherwise the API blocks requests. We use Laravel or Nest.js queues for reliable processing.
How to connect the WhatsApp Business API to a website?
Choosing a connection method:
| Criteria | Meta Cloud API (direct) | BSP provider (Twilio, 360dialog) |
|---|---|---|
| Cost | Free (pay only for messages) | Higher per-message fee |
| Connection complexity | Requires Business Manager verification | Registration in 1 day |
| Flexibility | Full control | Provider limitations |
| Support | Meta documentation only | Provider technical support |
For most projects, we recommend the direct Cloud API—it's cheaper and more flexible. Direct connection saves up to 70% on messages compared to BSP. It's also 3x faster to set up for teams with technical expertise. BSP is suitable if you need a quick launch without deep technical setup.
How we do it
We use PHP 8.3+ with Laravel 11, and for high-load projects—Nest.js (Node.js). Example of sending a template message via Cloud API:
Example of sending a template message
$response = Http::withToken(env('WHATSAPP_ACCESS_TOKEN')) ->post("https://graph.facebook.com/v19.0/{$phoneNumberId}/messages", [ 'messaging_product' => 'whatsapp', 'to' => $phone, 'type' => 'template', 'template' => [ 'name' => 'order_confirmation', 'language' => ['code' => 'en'], 'components' => [ [ 'type' => 'body', 'parameters' => [ ['type' => 'text', 'text' => $orderId], ['type' => 'text', 'text' => '$' . number_format($orderTotal, 2)] ] ] ] ] ]); Message templates. For outbound notifications, you must use pre-approved templates. The template is created in Meta Business Manager and undergoes review (typically 24–48 hours). Custom text in outbound messages is not allowed—only within the 24-hour session window.
24-hour window and session messages. If a user writes to the bot first or replies to a template message, a 24-hour window opens during which you can send free-form messages. This is used for support and dialogues:
Http::withToken($token)->post($url, [ 'messaging_product' => 'whatsapp', 'to' => $phone, 'type' => 'text', 'text' => ['body' => "Your order has been shipped, tracking number: {$trackNumber}"] ]); Webhook for incoming messages. Verification and processing:
if ($request->has('hub_challenge')) { if ($request->hub_verify_token === env('WHATSAPP_VERIFY_TOKEN')) { return response($request->hub_challenge); } } $body = $request->json()->all(); foreach ($body['entry'] as $entry) { foreach ($entry['changes'] as $change) { $messages = $change['value']['messages'] ?? []; foreach ($messages as $message) { dispatch(new ProcessWhatsAppMessageJob($message)); } } } Interactive buttons. Allow getting confirmations from the client without text input:
[ 'type' => 'interactive', 'interactive' => [ 'type' => 'button', 'body' => ['text' => 'Your order is ready for pickup. Confirm receipt:'], 'action' => [ 'buttons' => [ ['type' => 'reply', 'reply' => ['id' => "confirm_{$orderId}", 'title' => 'Received ✓']], ['type' => 'reply', 'reply' => ['id' => "problem_{$orderId}", 'title' => 'Problem']] ] ] ] ] How does the integration process work?
- Analysis—we study your current business processes and identify notification scenarios.
- Design—we develop the architecture: webhooks, queues, templates.
- Implementation—we configure Cloud API or BSP and write integration code.
- Testing—we verify sending, receiving, and error handling.
- Deployment—we launch into production and monitor the first days.
What's included in the work
- Setting up the WhatsApp Business API (direct or via BSP).
- Creating message templates for orders, payments, statuses.
- Implementing webhook for incoming message processing.
- Integration with your CRM or website.
- API documentation and admin instructions.
- Training employees on the system.
- 30-day post-launch support.
- Guaranteed 99.9% uptime for the integration.
- Certified WhatsApp API developers on staff.
Timeframes
Basic integration (notifications + incoming) takes 3 to 5 days. A full project with a chatbot and custom scenarios takes 7 to 14 days. The cost is calculated individually—contact us for an assessment.
Typical mistakes when integrating the WhatsApp Business API
- Using a number already linked to a personal WhatsApp account. A new number is required.
- Incorrect webhook configuration—verify token not set.
- Sending unapproved templates in outbound messages.
- Ignoring API rate limits (e.g., 10k messages per day).
- Lack of error handling (e.g., when Meta API is unavailable).
Comparison of message types
| Message type | When used | Template required |
|---|---|---|
| Template | Outbound notification (order, payment) | Yes |
| Session | Within 24-hour window (support) | No |
| Interactive | Action confirmation (buttons) | No, but can be in template |
Get a free consultation for your project—we'll assess the task and offer an optimal solution. Order the integration and we'll contact you within an hour.
Learn more in the official API documentation.







