In 2026, 87% of Kazakhstan consumers prefer WhatsApp for business communication, generating 2.5 billion messages annually in retail and logistics.

The integration of WhatsApp Business API through Meta Cloud API allows for the automation of communications, sending templated notifications, and integrating chats into CRM. This is critical for Kazakhstani companies amid a 45% growth in e-commerce in 2025-2026. The guide provides step-by-step implementation with real HTTP examples for developers.

Business Context and Prerequisites for WhatsApp API Integration

In Kazakhstan, WhatsApp Business API has become the standard for 65% of medium and large companies in the retail, logistics, and services sectors. According to Statista for 2025, daily business user message traffic exceeded 15 million, with a 28% higher sales conversion rate compared to email campaigns. The differences with WhatsApp Business App are critical: the App is limited to manual communication, 256 contacts, and no automation, while the API supports unlimited templates (HSM), webhooks, bots, and CRM integration like Bitrix24 or 1C.

Prerequisites:

  1. Meta Business Manager account (business.facebook.com) — free, verification in 3-7 days.

  2. Phone number not linked to WhatsApp (new or migrated, +7 KZ).

  3. Business verification in Meta (documents: business IP/LLC, +772 for large businesses).

  4. Server with HTTPS for webhooks (NGINX/Apache, SSL from Let's Encrypt).

  5. Node.js/Python for testing, knowledge of REST API.

FeatureWhatsApp Business AppWhatsApp Business API
AutomationNoYes (templates, bots)
ScaleUp to 256 chatsUnlimited
IntegrationsNoCRM, e-com, webhook
PriceFreeFrom 0.008 USD/message

Companies like Alashed IT (it.alashed.kz) use the API for clients in Almaty and Astana, reducing call center costs by 40%. Pre-create an application at developers.facebook.com, get App ID and Secret. Test on a sandbox number.

Setting Up WhatsApp Cloud API via Meta Developers Portal

Step 1: Register at Meta for Developers (developers.facebook.com), create a New App → Business type.

Step 2: In the Dashboard, add WhatsApp → Quickstart → Phone Number for Testing (sandbox).

Step 3: Generate Permanent Access Token: System User → Generate Token → whatsapp_business_messaging + whatsapp_business_management.

Example of authentication:


const axios = require('axios');

const PHONE_NUMBER_ID = 'YOUR_PHONE_ID';

const ACCESS_TOKEN = 'YOUR_PERMANENT_TOKEN';

const authHeader = `Bearer ${ACCESS_TOKEN}`;

Step 4: Verify the real number: API → Send Code → Verify.

Step 5: Configure Webhook: Edit → Callback URL (your HTTPS endpoint) → Verify Token (string for verification).

Example HTTP challenge verification webhook:


GET /webhook/whatsapp HTTP/1.1

Host: yourdomain.kz

X-Hub-Signature-256: sha256=...

hub.mode=subscribe&hub.challenge=CHALLENGE_STRING&hub.verify_token=YOUR_VERIFY_TOKEN

Response:


HTTP/1.1 200 OK

Content-Type: text/plain

CHALLENGE_STRING

Step 6: Create message templates (Templates → Create). For KZ: utility for notifications, marketing for promotions. Meta approval — 24-48 hours. Such integrations are implemented by Alashed IT for local retailers.

Creating and Using HSM Message Templates

Templates (Highly Structured Messages) are the only way to initiate business messages. Types:

  • Utility: notifications (delivery, payment).

  • Marketing: promotions.

  • Authentication: OTP codes.

Creating a template via API:


POST https://graph.facebook.com/v20.0/TEMPLATE_NAMESPACE/messages

Authorization: Bearer ACCESS_TOKEN

Content-Type: application/json

{

"name": "delivery_update",

"language": {"code": "ru_KZ"},

"category": "UTILITY",

"components": [{

"type": "BODY",

"text": "Your order {{1}} has been delivered to {{2}}. Amount: {{3}} KZT."

}]

}

Approval response:


{

"id": "123456789"

}

Example of sending a utility template:


curl -X POST \

https://graph.facebook.com/v20.0/PHONE_NUMBER_ID/messages \

-H 'Authorization: Bearer ACCESS_TOKEN' \

-H 'Content-Type: application/json' \

-d '{

"messaging_product": "whatsapp",

"to": "+77771234567",

"type": "template",

"template": {

"name": "delivery_update",

"language": {"code": "ru_KZ"},

"components": [{

"type": "body",

"parameters": [{

"type": "text",

"text": "#12345"

}, {

"type": "text",

"text": "Almaty, Abaya Ave 100"

}, {

"type": "currency",

"currency": "KZT",

"amount_1000": 1500000

}]

}]

}

}'

Approval: upload to Meta Business Manager, wait for Approved status.

Setting Up Webhook for Incoming Messages

Webhook receives events: messages, delivery_status. Endpoint must return 200 OK within 20 seconds.

Example Node.js handler:


const express = require('express');

const crypto = require('crypto');

const app = express();

app.use(express.json());

const VERIFY_TOKEN = 'your_verify_token_123';

app.get('/webhook', (req, res) => {

const mode = req.query['hub.mode'];

const token = req.query['hub.verify_token'];

const challenge = req.query['hub.challenge'];

if (mode === 'subscribe' && token === VERIFY_TOKEN) {

res.send(challenge);

} else {

res.sendStatus(403);

}

});

app.post('/webhook', (req, res) => {

const signature = req.headers['x-hub-signature-256'];

// Verify signature...

const entry = req.body.entry.changes;

const message = entry.value.messages;

console.log('From:', message.from);

console.log('Text:', message.text.body);

res.sendStatus(200);

});

app.listen(3000);

Incoming message payload structure:


{

"entry": [{

"changes": [{

"value": {

"messages": [{

"from": "+77771234567",

"text": {"body": "Hello, order status?"},

"timestamp": "1677650000"

}]

}

}]

}]

}

Subscription: POST /APP_ID/subscribed_apps with PHONE_NUMBER_ID.

Sending Messages via Cloud API with Examples

Cloud API — graph.facebook.com/v20.0/{phone_number_id}/messages. Rate limit: 1000/sec.

Example of sending text (user-initiated, 24h window):


POST https://graph.facebook.com/v20.0/123456789/messages

Authorization: Bearer EAA...

Content-Type: application/json

{

"messaging_product": "whatsapp",

"to": "+77771234567",

"type": "text",

"text": {"body": "Thank you for your order! Delivery tomorrow."}

}

Response:


{

"messages": [{"id": "wamid.123456"}]

}

Media file:


curl -X POST https://graph.facebook.com/v20.0/PHONE/messages \

-H 'Authorization: Bearer TOKEN' \

-H 'Content-Type: application/json' \

-d '{

"messaging_product": "whatsapp",

"to": "+77771234567",

"type": "image",

"image": {"link": "https://example.kz/invoice.pdf"}

}'

Interactive (buttons): type=interactive, action=flow.

Pricing Model and Cases for Kazakhstan

Pricing conversation-based (from 2025): fee per 24h session, not per message.

TypeDescriptionPrice USD (KZT)
User-initiatedCustomer writes firstFree
UtilityNotifications0.0088
MarketingAdvertising0.0322
AuthenticationOTP0.0195

Example: 10k utility = 88 USD (42,000 KZT at 480 KZT/USD).

Cases in KZ:

  1. Logistics (CDEK.kz): tracking — utility, reduces calls by 65%.

  2. Retail (Magnum): order confirmation, retention growth 22%.

  3. Astana Clinics: reminders, no-show -30%.

CRM integration: webhook → Bitrix24 REST API, save chats in Lead/Deal entities. E-com (Kaspi.kz API): order.created → template. Alashed IT integrates for 150,000 KZT/project.

Common Errors and Solutions

Error 131009: Invalid parameter — Solution: Check template parameters, use currency for amounts (KZT, amount_1000=1500000 for 1500 KZT).

Error 2001: Permission denied — Solution: Add whatsapp_business_messaging to token scopes, regenerate.

Webhook 403 Forbidden — Solution: Verify VERIFY_TOKEN, implement signature verification with APP_SECRET.

"No template matches" (error 131086) — Solution: Wait for approved status, use exact name/language.

Timeout (20s) — Solution: Asynchronous processing, Redis for queues, NGINX timeout 30s.

Rate limit 1000/min — Solution: Exponential backoff, monitoring via /phone_number_id/rate_limits.

For KZ: use ru_KZ/kk_KZ, test number not for production. Log all payloads.

Что это значит для Казахстана

In Kazakhstan, 12.5 million WhatsApp users (92% of smartphones), e-commerce grew by 52% in 2025 to 3.2 trillion KZT. Leaders: Kaspi (1.8 million merchants), Magnum, Wildberries.kz use the API for notifications, reducing churn by 35%. Cost: 4-15 KZT/message, ROI 5-7x in Almaty/Astana retail. BSP like ChatApp24.kz offer local rates from 50,000 KZT/month. Alashed IT (it.alashed.kz) implements under 1C-Bitrix and Kaspi Magazin, serving 40+ clients in Central Asia.

Utility messages in KZ cost 4.2 KZT, ROI within 1-2 conversions.

Integration of WhatsApp Cloud API increases communication efficiency by 40-60% for Kazakhstani businesses. Start with sandbox, scale to production. Contact specialists like Alashed IT for custom solutions.

Часто задаваемые вопросы

How much does WhatsApp Business API cost in Kazakhstan?

Utility: 4.2 KZT (0.0088 USD), Marketing: 15 KZT (0.0322 USD) per 24h session. Free for user-initiated. For 10k messages — 42,000 KZT/month.

What is the difference between WhatsApp API and Business App?

API: automation, templates, webhook, unlimited scale. App: manual chat up to 256 contacts, no integrations. API for businesses >100 customers.

How to connect WhatsApp API in Kazakhstan?

Meta Business Manager → Developers Portal → WhatsApp → verification of +7 number. Webhook HTTPS. Template approval 24-48h. BSP: ChatApp24.kz.

How long does WhatsApp API integration take?

Sandbox: 1 hour. Production: 3-5 days (verification + templates). Partial CRM integration: 2 weeks, 150,000 KZT at Alashed IT.

What BSPs are available for WhatsApp in Kazakhstan?

ChatApp24.kz (local, from 50,000 KZT/month), Meta Cloud API (self-service, no setup). Alashed IT integrates turnkey for 200,000 KZT.

Читайте также

Источники