{"templateId":"markdown","versions":[{"version":"9.0","label":"9.0","link":"/classes/whmcs/module/contracts/notificationmoduleinterface","default":true,"active":true,"folderId":"9d7dc099"},{"version":"8.13","label":"8.13","link":"/classes/8.13/whmcs/module/contracts/notificationmoduleinterface","default":false,"active":false,"folderId":"9d7dc099"}],"sharedDataIds":{"sidebar":"sidebar-classes/@8.13/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"WHMCS\\Module\\Contracts\\NotificationModuleInterface","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"whmcsmodulecontractsnotificationmoduleinterface","__idx":0},"children":["WHMCS\\Module\\Contracts\\NotificationModuleInterface"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Interface"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Notification Module Interface"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All Notification modules must implement this interface"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods","__idx":1},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"settings","__idx":2},"children":["settings"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function settings()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List of settings required for module activation/configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["EX."," ","return ["," ","'api_username' => ["," ","'FriendlyName' => 'API Username',"," ","'Type' => 'text',"," ","'Description' => 'Required username to authenticate with message service',"," ","],"," ","'api_password' => ["," ","'FriendlyName' => 'API Password',"," ","'Type' => 'text',"," ","'Description' => 'Required password to authenticate with message service',"," ","],"," ","];"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isactive","__idx":3},"children":["isActive"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function isActive()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Is this notification provider active?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getname","__idx":4},"children":["getName"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getName()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns bare class name of the specific notification module."," ","EX. 'Hipchat' or 'Aim' or 'MyMessageModerator'"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getdisplayname","__idx":5},"children":["getDisplayName"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getDisplayName()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get display name for the notification module."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getlogopath","__idx":6},"children":["getLogoPath"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getLogoPath()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Logo of provider."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Publicly accessible path relative to WHMCS System URL."," ","Expressed as \"absolute\" path (leading forward slash)"," ","EX. '/modules/notifications/messagemod/messagemod.png'"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"testconnection","__idx":7},"children":["testConnection"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function testConnection($settings)\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Routine to validate settings for activation/configuration of notification provider"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$settings"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}," — Return true for success"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"notificationsettings","__idx":8},"children":["notificationSettings"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function notificationSettings()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List of settings relevant to the delivery of a notification"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["EX."," ","['channel' => ["," ","'FriendlyName' => 'Channel',"," ","'Type' => 'dynamic',"," ","'Description' => 'Select the desired channel for notification delivery.',"," ","'Required' => true,"," ","],"," ","]"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getdynamicfield","__idx":9},"children":["getDynamicField"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getDynamicField($fieldName, $settings)\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Retrieve option values used to populate a 'dynamic' Type notification setting"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$fieldName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Notification setting field name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$settings"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Settings for the module"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sendnotification","__idx":10},"children":["sendNotification"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function sendNotification(NotificationInterface $notification, $moduleSettings, $notificationSettings)\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deliver notification"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NotificationInterface"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$notification"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A notification to send"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$moduleSettings"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configured settings of the notification module"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$notificationSettings"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configured notification settings set by the triggered rule"]}]}]}]}]}]},"headings":[{"value":"WHMCS\\Module\\Contracts\\NotificationModuleInterface","id":"whmcsmodulecontractsnotificationmoduleinterface","depth":1},{"value":"Methods","id":"methods","depth":2},{"value":"settings","id":"settings","depth":3},{"value":"isActive","id":"isactive","depth":3},{"value":"getName","id":"getname","depth":3},{"value":"getDisplayName","id":"getdisplayname","depth":3},{"value":"getLogoPath","id":"getlogopath","depth":3},{"value":"testConnection","id":"testconnection","depth":3},{"value":"notificationSettings","id":"notificationsettings","depth":3},{"value":"getDynamicField","id":"getdynamicfield","depth":3},{"value":"sendNotification","id":"sendnotification","depth":3}],"frontmatter":{"title":"WHMCS\\Module\\Contracts\\NotificationModuleInterface","seo":{"title":"WHMCS\\Module\\Contracts\\NotificationModuleInterface"}},"lastModified":"2026-08-05T14:37:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/classes/whmcs/module/contracts/notificationmoduleinterface","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}