How to send a failed domain-renewal SMS notification in WHMCS
Use PD AWS SNS to notify a client when a WHMCS registrar renewal command fails. This is a failure-event notification, separate from an advance expiry reminder or a message saying a renewal succeeded.
Prepare Domain Texts and the template
Open AWS SNS → Client Preferences and review Domain Texts. The category starts hidden, so offer the intended choices deliberately and apply them to client profiles. A trigger cannot send its client notification while that category is Not offered or the client’s preference blocks it.
Check the client’s effective mobile-number source and country. Create an enabled template under Templates, using the domain field rather than invoice or ticket fields. For example: `Hi {first_name}, we could not complete the renewal of {domain}. Please check your client area or contact support. {company_name}`.
Keep the message factual. A renewal failure does not establish that the domain is already expired, that payment failed or that another renewal attempt is appropriate. Do not include private registrar errors or account credentials in the customer’s SMS.
Create the client trigger
- Open PD Modules → AWS SNS → Triggers → New trigger.
- Choose Domain renewal failed under When this happens.
- Choose the intended enabled template under Send this template.
- Select an explicit Send via gateway and choose Create trigger.
- Review the saved event, template, gateway and enabled state.
Use Test / Debug Log only for a controlled rehearsal. Do not deliberately fail or repeat a live domain renewal merely to test a text. The notification depends on the original WHMCS registrar action reporting a renewal failure and the module being able to identify the domain’s client.
Configure a separate staff alert if needed
Under Admin Alert Center, a staff member can choose Domain renewal failed among their event subscriptions. This is separate from the client trigger and its Domain Texts preference. Staff alerts use the default gateway and are immediate; the client trigger follows its selected routing, category preference and queue settings.
An alert is a prompt to inspect the original domain and registrar result. It does not renew the domain, reverse a charge or fix the underlying refusal. Resolve the actual renewal state before deciding on another registrar action.
Investigate a missing message
Check the original renewal result, client/domain association, phone-number source, category preference and enabled template/trigger. Then review queue timing, normal cron operation and History. An invoice becoming overdue or a domain nearing expiry is not the failed-renewal event this trigger listens for.
For Amazon SNS, acceptance is distinct from phone delivery. Reconcile an Unknown timeout before manually repeating a message. Do not repeat a registrar action to generate diagnostic messages.
See the PD AWS SNS WHMCS guide for related tasks, or explore PD AWS SNS.