Magento / Adobe Commerce
Overview
A Magento 2 module that messages the customer on WhatsApp when an order enters Processing or Complete. Configured entirely from the admin, with encrypted key storage.
Requirements
- Magento 2.4+ / Adobe Commerce
- PHP 7.4+
- SSH/CLI access to run
bin/magento - An API key and active plan
Download
Get it from Client area → Downloads → Magento Extension. The zip contains the Bookbey/WhatsApp module tree.
Upload
Copy the module into your Magento source tree:
app/code/Bookbey/WhatsApp/
So that registration.php sits at app/code/Bookbey/WhatsApp/registration.php.
Enable the module
From the Magento root, run:
bin/magento module:enable Bookbey_WhatsApp bin/magento setup:upgrade bin/magento setup:di:compile # production mode only bin/magento cache:flush
Configuration
In the admin: Stores → Configuration → BOOKBEY → WhatsApp. Set Enable = Yes, paste the API key (stored encrypted) and API base URL (https://bookbey.com/public/api), a default country code, toggle Processing/Complete and edit the messages. Save, then flush cache.
Message placeholders
{name}, {order}, {total}, {site} are substituted per order.
Phone number format
Phone numbers are digits only, in international format without a leading + or spaces — country code followed by the number, e.g. 9198XXXXXXXX for India. Modules that take orders will prefix a configurable default country code to any local number that is missing one.
How it works
An observer on sales_order_save_after detects the state transition to Processing or Complete, normalises the billing telephone, fills your message and calls the API. On success it adds a comment to the order's status history.
Error handling
Errors are returned as JSON with ok:false, a machine-readable error code and a human message. The HTTP status reflects the error class.
| HTTP | error code | Meaning & fix |
|---|---|---|
| 401 | unauthorized / invalid_api_key | Key missing, wrong, or revoked. Re-copy it from API Keys. |
| 402 | no_active_plan | No active plan on the account. Buy or renew a plan. |
| 403 | account_suspended | Account suspended. Contact support / clear dues. |
| 422 | invalid_json | Body was not valid JSON. Check Content-Type and payload. |
| 422 | invalid_number | Destination number malformed. Use country code + number, digits only. |
| 429 | quota_exceeded / rate_limited | Monthly quota used up, or sending too fast. Check status.php; retry with backoff. |
| 500 | server_error | Transient server error. Retry; if it persists, contact support. |
Troubleshooting
- Module not visible: run
setup:upgradeand confirmbin/magento module:status Bookbey_WhatsAppshows enabled. - Config not saving key: the field is encrypted; ensure your
crypt keyis set (default inapp/etc/env.php). - No message: confirm the order really transitioned to Processing/Complete and the billing address has a phone.
- Changes not showing:
cache:flush; in production runsetup:di:compileafter copying the module.
FAQ
Does it edit core? No — it's a self-contained module using standard DI + observers. Multi-store? Config is store-scoped, so you can enable per store view. Where are the messages logged? Successes appear in the order's status history.
Need help? Open a ticket from Client area → Support. Your API base URL is https://bookbey.com/public/api.