WhatsApp Notifications
Connect the WhatsApp Business API so customers automatically receive booking confirmations, tour reminders, and review requests.
Prerequisites
- •A Facebook Business account (business.facebook.com)
- •A phone number that can receive SMS for verification
- •Admin access to your BestPhuketGuide dashboard
Step 1: Create a Meta App
- Go to developers.facebook.com
- Click My Apps → Create App
- Select Business as the app type
- Enter app name:
BestPhuketGuide WhatsApp - Select your Business account and click Create App
Step 2: Add WhatsApp Product
- In your app dashboard, click Add Product
- Find WhatsApp and click Set Up
- Select your Business account when prompted
Step 3: Get Your Phone Number ID
- Go to WhatsApp → API Setup in the left sidebar
- You'll see a test phone number provided by Meta
- Copy the Phone Number ID (a long number like
123456789012345) - Save this — you'll need it for the admin panel
Step 4: Add Your Business Phone Number (Production)
- Go to WhatsApp → Phone Numbers
- Click Add Phone Number
- Enter your business phone number (e.g.,
+66 86 470 3996) - Verify via SMS or voice call
- Once verified, copy the new Phone Number ID
Step 5: Generate a Permanent Access Token
The test token expires in 24 hours. For production, create a system user token that doesn't expire:
- Go to Business Settings → System Users
- Click Add → name it
whatsapp-api→ role: Admin - Click the system user → Generate New Token
- Select your WhatsApp app
- Check these permissions:
whatsapp_business_messagingandwhatsapp_business_management - Click Generate Token
- Copy and save the token immediately — it won't be shown again
Step 6: Configure in Admin Panel
- Go to Settings → Notifications
- Toggle Enable WhatsApp notifications ON
- Enter your Phone Number ID (from Step 3 or 4)
- Enter your Access Token (from Step 5)
- Choose which notifications to enable:
- ✓ Booking confirmation — sent when payment is confirmed
- ✓ Tour reminder — sent day before at 6 PM Phuket time
- ✓ Review request — sent 24 hours after the tour
- Click Save Notification Settings
Step 7: Send a Test Message
- Still on the Notifications tab, find the Send Test section
- Enter your phone number in international format (no + or spaces, e.g.
66864703996) - Click Send
- You should receive a WhatsApp message within seconds
How Notifications Work
Booking Confirmation
- • Stripe: sent after successful Stripe webhook
- • Bank transfer: sent immediately on booking creation
- • Cash: sent immediately on booking creation
- • Content: booking ref, tour name, date, guests, total, meeting point, departure time
Tour Reminder
- • Cron job runs hourly, sends reminders at 6 PM Phuket time (UTC+7)
- • Sent the day before the tour date
- • Includes tour details and what-to-bring checklist
- • Deduplication: won't send the same reminder twice
Review Request
- • Sent 24 hours after the tour date
- • Includes a link to the review submission page
- • Can also be sent manually from the Bookings page
Example Message Format
Messages are sent as plain text (not Meta templates) for flexibility:
✅ *Booking Confirmed!*
Hi John,
Your booking has been confirmed:
🎫 *Ref:* BPG-ABC123
🚤 *Tour:* Phi Phi Islands Day Trip
📅 *Date:* 2026-04-15
👥 *Guests:* 2 adults, 1 child
💰 *Total:* ฿3,500
📍 *Meeting Point:* Chalong Pier, Phuket
⏰ *Departure:* 08:00
Please save your booking reference. Show it to your guide on the day.
Questions? Reply to this message or call us.
_Best Phuket Guide_Troubleshooting
Messages not sending?
- 1. Check the Email Log page — WhatsApp messages are logged there too
- 2. Verify your Access Token hasn't expired
- 3. Ensure the recipient's number is in international format (no +, no spaces)
- 4. Check Meta Developer dashboard for API errors
"dev mode" appearing in logs?
WhatsApp is not configured — messages are only logged to console. Go to Settings → Notifications and enter your credentials.
Hitting rate limits?
Meta WhatsApp Cloud API free tier: 1,000 conversations/month. For higher volume, create pre-approved message templates in WhatsApp → Message Templates in Meta Business Manager.
Cost Estimate
| Volume | Monthly Cost |
|---|---|
| Up to 1,000 conversations | Free |
| 1,000–5,000 conversations | ~$5–40/month |
| 5,000–10,000 conversations | ~$40–80/month |
A "conversation" = 24-hour messaging window with one customer. Sending confirmation + reminder on the same day counts as 1 conversation. Next-day reminder is a separate conversation.
Security Notes
- ⚠The Access Token is stored in your D1 database (site_settings table)
- ⚠For production, consider moving it to Cloudflare Worker Secrets: wrangler secret put WHATSAPP_ACCESS_TOKEN
- ⚠Never expose the token in client-side code or commit it to git
- ⚠The token has permission to send messages from your business number — treat it like a password
Related Guides