CloudWave Bulk SMS — Docs

Integration guide · WHMCS

WHMCSWHMCS Module

Send SMS to your WHMCS clients and staff — order receipts, invoice alerts, ticket notifications and bulk campaigns — straight from your admin area, using the same wallet as your Bulk SMS portal. This guide takes you from download to a working test SMS in about 10 minutes.

Component
Addon module
Also includes
Notification provider
Requires
WHMCS 8.x · PHP 7.4+
Talks to
https://sms.cloudwavebd.com/api

1. What it does

The CloudWave SMS integration for WHMCS is a normal addon module. It connects your WHMCS to your CloudWave Bulk SMS account and lets you:

  • See your SMS wallet balance and available Sender IDs inside WHMCS.
  • Send a one-off SMS to a client, a client group, or a pasted list.
  • Run bulk campaigns to a filtered audience (status / group / country / cap), throttled by the WHMCS cron.
  • Automate event SMS: new client, invoice created/paid/reminder, order placed/activated, ticket opened/replied, and staff alerts.
  • Keep a delivery log of everything sent, with cost and status.

There are two parts, shipped together:

PartFolderWhat it is for
Addon modulemodules/addons/cloudwave_sms/The admin UI (Overview, Send, Bulk, Templates, Log, Settings) and the event hooks.
Notification providermodules/notifications/CloudWaveSms/Lets WHMCS Notification Rules deliver SMS (staff alerts and anything the rule engine fires). Optional.
The module authenticates with a per-integration API key + secret. Your portal login is never stored in WHMCS, and no database is shared between the two systems.

2. Requirements

  • WHMCS 8.x (tested on 8.10) running on PHP 7.4 or newer.
  • A CloudWave Bulk SMS account — the portal at https://sms.cloudwavebd.com (you sign in there with your WHMCS client login).
  • Funds in your portal SMS wallet (top up under Add Funds — bKash or WHMCS invoice).
  • WHMCS cron configured and running (needed for bulk campaigns and scheduled sends).
  • Outbound HTTPS (cURL) allowed from the WHMCS server to the portal — most hosts allow this by default.

3. Download

Download the module ZIP, then upload the two folders inside it into your WHMCS installation.

cloudwave-whmcs-modules.zip

Contains modules/addons/cloudwave_sms/ and modules/notifications/CloudWaveSms/.

Unzip on your computer first, then upload the folder contents — do not upload the ZIP into WHMCS.

4. Install the module

  1. Unzip the downloadYou will have two folders: cloudwave_sms (the addon module) and CloudWaveSms (the notification provider).
  2. Upload the addon modulePut the cloudwave_sms folder in <whmcs>/modules/addons/, so the path is exactly:
    <whmcs>/modules/addons/cloudwave_sms/cloudwave_sms.php
    <whmcs>/modules/addons/cloudwave_sms/hooks.php
    <whmcs>/modules/addons/cloudwave_sms/lib/…
    <whmcs>/modules/addons/cloudwave_sms/views/…
  3. Upload the notification providerPut the CloudWaveSms folder in <whmcs>/modules/notifications/:
    <whmcs>/modules/notifications/CloudWaveSms/CloudWaveSms.php
  4. Check the file layoutEvery file must be present, including the whole lib/ and views/ sub-folders. A partial upload is the most common cause of a blank module page (the module will tell you which file is missing).
On Linux servers the folder name is case-sensitive: the addon must be cloudwave_sms and the file inside it cloudwave_sms.php.

5. Get your API credentials

  1. Open the portalGo to https://sms.cloudwavebd.com and sign in (this uses your WHMCS client login).
  2. Create a dedicated keyOpen API & Plugins in the sidebar and click Generate API credentials. Use a separate key for WHMCS so you can revoke it later without affecting your website or scripts.
  3. Copy both valuesCopy the API Key (starts with cw_) and the API Secret. Keep them safe — the secret is private.
  4. Top up if neededUnder Add Funds, add wallet credit (bKash or a WHMCS invoice). A send is only accepted if the balance covers it.

6. Activate & configure

  1. ActivateIn WHMCS go to Setup → Addon Modules, find CloudWave SMS and click Activate. Activation creates the five mod_cloudwave_sms_* tables.
  2. Access controlStill in Setup → Addon Modules, click Configure (or Access Control) and grant the module to the admin roles that should use it.
  3. Enter your settingsOpen the module (Addons → CloudWave SMS → Settings) and fill in the fields below.
  4. SaveClick Save, then use Test API connection on the Overview tab.

Settings reference

SettingWhat to put
Portal Base URLhttps://sms.cloudwavebd.com — no trailing slash.
API KeyThe cw_… key from step 5.
API SecretThe secret from step 5 (stored server-side only).
Default Sender IDOptional. Blank = the portal account default.
Admin SMS RecipientsYour staff mobile numbers for staff alerts — one per line or comma separated.
Enable Event AutomationMaster switch for the automatic event SMS (see section 9).
Enable Delivery LogRecords every message in the module log. Turn off on very high-volume installs.
Log Retention (days)Rows older than this are pruned by the WHMCS cron (default 90).
Recipients per API CallUp to 500 (the portal's per-request cap). Used for bodies without merge tags.
Messages per Cron RunHow much of a bulk campaign each WHMCS cron run sends (default 500).
API Timeout (seconds)HTTP timeout for portal calls (default 30).

7. The module screens

TabWhat it is for
OverviewLive wallet balance and Sender IDs from the portal, delivery counters, Test API connection and Send test SMS, plus the latest activity.
Send SMSOne message to a single client (with merge tags), a client group, all clients, or pasted numbers. Up to 500 recipients.
Bulk CampaignQueue a campaign to a filtered audience. Drained by cron; a Push now button sends a slice immediately. Also the opt-out list.
TemplatesEnable/disable and reword every automation, with a live preview and the merge-tag table.
LogEvery message the module sent — recipient, source, event, parts, cost, status and error. Filterable and paginated.
SettingsThe same fields as the addon configuration page, editable in place.
Start on Overview: click Test API connection, then Send a test SMS to your own mobile. If the test arrives, everything is wired correctly.

8. Bulk campaigns & cron

A bulk campaign is queued immediately and sent progressively, so a large audience never blocks a web request:

  1. Audience is resolvedFrom tblclients, one row per recipient is written to the queue table and the message is merged per client.
  2. Cron drains the queueEach WHMCS cron run (AfterCronJob) pushes up to Messages per Cron Run.
  3. Bodies are packedMessages without merge tags are sent in single API calls of up to Recipients per API Call; personalised bodies go one-per-recipient. Failures retry up to three times.
Run WHMCS cron frequently (every 5 minutes is ideal) so campaigns finish promptly. No extra cron entry is required — the module hooks into the existing WHMCS cron.
Messages already accepted by the gateway are billed to your portal wallet and are not refunded when you cancel a campaign.

9. Event automations

Each event maps to a WHMCS hook. Client events message the client's number on file; staff events message the Admin SMS Recipients setting.

EventWHMCS hookSent to
Client RegistrationClientAddclient
Invoice CreatedInvoiceCreatedclient
Invoice PaidInvoicePaidclient
Payment ReminderInvoicePaymentReminderclient
Order PlacedAfterShoppingCartCheckoutclient
Order ActivatedAcceptOrderclient
Support Ticket OpenedTicketOpenclient
Support Ticket ReplyTicketReplyclient (staff replies only)
Staff Alert: New ClientClientAddstaff
Staff Alert: New OrderAfterShoppingCartCheckoutstaff
Staff Alert: Invoice PaidInvoicePaidstaff
Staff Alert: New TicketTicketOpenstaff

Only valid Bangladeshi mobile numbers (017…, 8801…, +8801…) are messaged; a client without one is skipped silently. Each template can be enabled/disabled and reworded on the Templates tab.

Branded by default. Every template is shipped enabled (client and staff alike) and begins with ({company_name}) as required by BD regulations. {company_name} resolves to your WHMCS company name. You can edit the wording — or remove the brand tag — for any event on the Templates tab.

Merge tags

Every template supports {company_name}, {whmcs_url}, {date}, {time}, plus:

GroupTags
Client{client_id} {first_name} {last_name} {full_name} {company} {email} {phone}
Invoice{invoice_id} {invoice_num} {invoice_total} {invoice_balance} {invoice_due_date} {invoice_status} {invoice_url}
Order{order_id} {order_num} {order_total} {order_status} {order_url}
Ticket{ticket_id} {ticket_subject} {ticket_department} {ticket_url}

Unknown tags are stripped before sending, so a client never sees a stray {typo}.

10. Notification provider (optional)

The notification provider lets WHMCS Notification Rules deliver SMS — useful for staff alerts and anything the rule engine fires.

  1. Activate itGo to Setup → Staff Management → Notification Providers, find CloudWave SMS and activate it with the same base URL, key and secret. Add optional Fallback Recipients.
  2. Add recipients per ruleUnder Notification Rules, open each rule and set the SMS Recipients (one number per line) and an optional Sender ID override.

The provider validates the credentials when you save and warns you if the wallet balance is zero. It works with or without the addon module.

11. Wallet top-ups paid through WHMCS

Besides bKash, your clients can top up their SMS wallet by paying a WHMCS invoice with any gateway enabled in WHMCS. The portal creates the invoice; when WHMCS marks it paid, the wallet is credited automatically.

How it flows

  1. Client chooses “Pay via WHMCS”On the portal's Add Funds page the client enters an amount; the portal records a pending top-up.
  2. Portal creates an invoiceIt calls the WHMCS API (CreateInvoice) with a line item that contains an SMTOP-<id> reference, then redirects the client to viewinvoice.php.
  3. Client paysWith any gateway enabled in WHMCS (card, mobile banking, bank transfer).
  4. InvoicePaid hook notifies the portalThe hook finds the SMTOP-<id> marker and POSTs a signed payload to the portal's /whmcs-callback.
  5. Wallet creditedThe portal verifies the HMAC signature and credits the wallet. Duplicate callbacks are ignored (idempotent).

One-time setup

  1. Create WHMCS API credentialsIn WHMCS: Setup → Staff Management → API Credentials (Config → System → API Credentials). Note the Identifier and Secret.
  2. Put them in the portalOn the portal server, set SMS_WHMCS_API_IDENTIFIER and SMS_WHMCS_API_SECRET in config/secrets.php.
  3. Install the updated hookMake sure <whmcs>/includes/hooks/cloudwave_sms.php is the version that ships with the module — it contains the InvoicePaid handler. (It is also the file that powers the SSO login button.)
  4. Optional: callback secretBy default the portal signs the callback with the SSO secret. To use a separate one, set the same sms_callback_secret in the CloudWave Console addon settings and SMS_WHMCS_CALLBACK_SECRET in the portal.
The hook only reacts to invoices that carry the SMTOP-<id> marker, so your normal client invoices are unaffected. If the callback cannot reach the portal it is written to the WHMCS activity log.
This feature requires the updated includes/hooks/cloudwave_sms.php from this module package. If you previously installed an older SSO-only copy, replace it with the new one.

12. Testing checklist

  1. Test API connectionOverview tab → shows your live wallet balance and how many Sender IDs are available.
  2. Send a test SMSOverview tab → send to your own mobile. Then check the Log tab for the row.
  3. One-off sendSend SMS tab → a client, a group, or pasted numbers.
  4. Bulk campaignBulk tab → create a small campaign and press Push now; then confirm it drains on the next cron run.
  5. AutomationTemplates tab → enable one event (e.g. Invoice Paid) and trigger it in a test order.
  6. Top-up (optional)Behave as a client: Add Funds → Pay via WHMCS → pay the invoice → confirm the wallet is credited.

13. Troubleshooting

SymptomLikely cause & fix
Module page is blankA missing file (partial upload) or a stale opcode cache. Re-upload the whole folder, then reset OPcache / LiteSpeed cache.
“Not configured yet”API key/secret missing. Fill them on the Settings tab.
Invalid API key or secretKey copied incompletely, or the credentials were revoked in the portal. Generate a fresh set.
Insufficient wallet balanceTop up the portal wallet — a send is only accepted if the balance covers it.
No Sender ID is configuredNo enabled provider on the portal. Contact the operator.
Automations do nothingThe template is disabled, Enable Event Automation is off, or the client has no valid mobile number.
Bulk campaign sticks at “sending”WHMCS cron is not running, or Messages per Cron Run is too small.
Staff alerts never arriveAdmin SMS Recipients is empty or the numbers are not valid BD mobiles.
Top-up paid but wallet not creditedThe InvoicePaid callback could not reach the portal (check the WHMCS activity log), or the API credentials are not set in the portal.
Everything the module attempts is in the Log tab, including the portal's exact error message and HTTP status. Check there first.

14. Upgrade / uninstall

Upgrading

Replace the files in modules/addons/cloudwave_sms/ (and the notification provider) with the new version, then reset OPcache. Settings and data are preserved.

Deactivating

Deactivating in Setup → Addon Modules stops the automations but keeps all tables and settings.

Removing completely

To remove all data, deactivate the module and drop the tables mod_cloudwave_sms_log, mod_cloudwave_sms_queue, mod_cloudwave_sms_batch, mod_cloudwave_sms_templates and mod_cloudwave_sms_optout.

Looking for the REST API itself? See the API Reference. Using WordPress/WooCommerce? See the WordPress plugin guide.

CloudWave Bulk SMS · WHMCS module guide · Last updated 23 Oct 2026.