Requirements & Install
No database changes, no activation step — copy one folder and configure the provider.
Requirements
| Requirement | Minimum |
|---|---|
| WHMCS | 8.13+ / 9.x (developed on WHMCS 9) |
| PHP | 8.1 or higher |
| Extensions | cURL, JSON, mbstring |
| Network | Outbound HTTPS (443) to stoat.chat or your self-hosted Stoat host |
| Stoat | A channel where you can create and manage webhooks |
| WHMCS cron | Configured and running |
The module has no Composer dependencies and no external assets. It is a single PHP class plus metadata and a logo.
1. Upload the module
Copy the Stoat folder into your WHMCS installation:
/path/to/whmcs/modules/notifications/Stoat/
The folder should contain:
Stoat.php
whmcs.json
logo.png
README.md
docs/
Keep the folder and file names exactly as shipped. WHMCS matches the folder name, the file name and the class name.
2. Open the notification provider
In the WHMCS Admin Area go to Configuration → System Settings → Notifications. Stoat is listed as a notification provider. Notification modules do not need activation like addon modules; WHMCS discovers them from modules/notifications/.
3. Create the Stoat webhook
- Open the Stoat server and go to the channel that should receive notifications.
- Right-click the channel and choose Open Channel Settings.
- Open the Webhooks tab and click Create Webhook.
- Give it a name and optional avatar, then click Create.
- Click Copy webhook URL. The URL looks like
https://stoat.chat/api/webhooks/{id}/{token}.
4. Webhook permissions
Grant the permissions the selected format needs. The test message sent on save will tell you if one is missing.
| Permission | When it is needed |
|---|---|
SendMessages | Always |
SendEmbeds | Format Embed only or Message + Embed |
Masquerade | A sender name or sender avatar is configured |
ManageRole | Not used by this module (masquerade colour is not set) |
MentionEveryone | Not used — mentions in notification text are neutralised |
5. Configure the provider
Click Configure next to Stoat and fill in:
- Webhook URL — the URL copied from the channel.
- Sender Name — optional masquerade name, for example
WHMCS. Leave blank to post as the webhook’s own name. - Sender Avatar URL — optional HTTPS image URL, 256 characters or fewer.
- Allow Self-Hosted Host — tick only for a non-
stoat.chathost. - Request Timeout — 1 to 30 seconds, default 10.
- Strict Delivery — see Settings Reference.
Click Save Changes. WHMCS calls the module’s connection test: a message is posted to the channel and any error is shown in the save dialog. The test never degrades — a missing permission must be fixed before the settings are accepted.
6. Create a notification rule
- On the same Notifications page click Create New Notification Rule.
- Enter a name and description.
- Choose an event category and one or more events.
- Add conditions if the rule should only fire for certain clients, amounts, departments or priorities.
- Under notification settings choose Stoat as the provider.
- Choose the message format, embed colour, attribute options and whether the message is silent.
- Click Create.
Detailed examples are on the Notification Rules page.
7. Verify
- Confirm the test message arrived in the channel when you saved the provider settings.
- Trigger a real event covered by your rule, such as marking a test invoice paid.
- Go to Utilities → Logs → Module Log, filter by
Stoatand confirm the request, HTTP status and message ID. - Confirm the logged URL ends in
[redacted]rather than showing the token.
Upgrading
- Back up the current
modules/notifications/Stoatfolder. - Replace it with the new release, keeping the folder name
Stoat. - Provider settings and notification rules are stored by WHMCS and are preserved.
- Open the provider configuration and save once after a major update so the connection test runs against the new version.
Uninstalling
- Disable or delete notification rules that use Stoat first, otherwise WHMCS will report a missing provider.
- Delete the
modules/notifications/Stoatfolder. - Optionally delete the Stoat webhook in the channel settings.