How to send invoice SMS notifications in WHMCS with Amazon SNS
Notify customers when an invoice is created or paid using separate PD AWS SNS triggers. These are billing-event messages, with invoice-specific merge fields; a bulk SMS campaign is a different workflow.
Prepare Billing Texts and templates
Open AWS SNS → Client Preferences and review Billing Texts. Apply the intended profile choices and check the test client’s effective mobile number. A hidden billing category prevents its automatic messages even if a trigger is enabled.
Create two enabled templates under Templates. A new-invoice notice can use Hi {first_name}, invoice {invoice_id} for {invoice_total} is due on {invoice_due}. Please check your client area. A paid-invoice notice can use Hi {first_name}, invoice {invoice_id} is now marked paid. Thank you from {company_name}.
Use the invoice number customers recognise, and inspect the rendered amount with its currency. A preview with sample data does not prove that every real invoice context is correct. Rehearse the intended event in a controlled test workflow through Test / Debug Log only before choosing a live gateway.
Create each trigger
- Open AWS SNS → Triggers → New trigger.
- Choose Invoice created, select the new-invoice template and an explicit Send via gateway, then choose Create trigger.
- Create a second trigger for Invoice paid, using the paid-invoice template.
- Review both rows for the correct template, gateway and enabled state.
Invoice created follows invoice creation; Invoice paid follows the invoice being marked paid. A paid-invoice SMS is not a separate test of payment-gateway settlement, provisioning success or an external bank transaction.
These events cover renewals as well as initial invoices. Do not describe every paid-invoice text as a new order confirmation. Check for an existing trigger for the same event to avoid duplicate notifications.
Diagnose a missing notice
Confirm the original event occurred, the client has the intended mobile number and Billing Texts allows the message. Check that the selected template and trigger are enabled. Review pending work, quiet hours and normal cron operation before expecting a History attempt.
If History says Sent through Amazon SNS, AWS accepted the request; it does not prove phone delivery. Inspect the provider reference and AWS delivery evidence. A timeout marked Unknown should be reconciled before a manual repeat. Do not create or mark a real invoice paid merely to test the notification.
See the PD AWS SNS WHMCS guide for related tasks, or explore PD AWS SNS.