{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Module Parameters","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":"module-parameters","__idx":0},"children":["Module Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The module parameters are the data/values passed into each function when called."," ","Every provisioning module function receives the same parameters."," ","These parameters provide information about the specific product/service the module command runs for."," ","The parameters also contains the settings from the product itself."]},{"$$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":"Variable Name"},"children":["Variable 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":["serviceid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The unique ID of the service.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Database Field: tblhosting.id"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["userid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The unique ID of the account that owns the service.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Database Field: tblclients.id",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"This variable uses naming conventions that originated prior to WHMCS 8.0."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["pid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The product ID for the service.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Database Field: tblproducts.id"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serverid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The assigned server ID for the service.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Database Field: tblservers.id"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["domain"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The domain entered by the customer when ordering.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Database Field: tblhosting.domain"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["username"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Username generated for the service. (defaults to first 8 letters of the domain)",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Database Field: tblhosting.username"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["password"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Password generated for the service. (10 char generated on first creation consisting of letters & numbers, both upper & lowercase).  ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Database Field: tblhosting.password"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["producttype"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The product type which can be one of hostingaccount, reselleraccount, server or other."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["moduletype"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The module name (will match filename of module)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["configoptionX"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["with X being from 1 to 24. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"These fields contain the module settings for the product defined in the ConfigOptions function."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["clientsdetails"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Contains an array of all client details service owner. This contains things like firstname, lastname, email, address1, country, etc…"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["customfields"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Contains an array of all custom fields defined on the product.  ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"The key is the custom field name - $params['customfields']['Field Name']."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["configoptions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Contains an array of all the configurable options defined on the product.  ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Again the key being the option name in this case - $params['configoptions']['Option Name Here']."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["server"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true/false - Is the product assigned to a server."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serverip"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The IP Address of the selected server."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serverhostname"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Hostname of the selected server."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serverusername"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Username of the selected server."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serverpassword"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Password of the selected server."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serveraccesshash"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Access Hash of the selected server."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serversecure"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true/false - Is an SSL connection enabled in the Server Configuration."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["serverport"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The server port if module supports override with custom port"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"config-options","__idx":1},"children":["Config Options ",{"$$mdtype":"Tag","name":"a","attributes":{"id":"config-options"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/provisioning-modules/getting-started#product-configuration-options","title":"Product Configuration Options"},"children":["Config Options"]}," (do not confuse with Configurable Options) are the module's settings."," ","These are defined in the ConfigOptions function of the module."," ","Config Options are set on a per product basis."," ","Supplied as a numbered list: $params[‘configoption1’], $params[‘configoption2’], etc."," ","Defined by the order specified in the ConfigOptions function of the module."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Every module function except the _ConfigOptions function receives the $params array. The _ConfigOptions function is unique because it is the only function that is not called in relation to a specific client instance of a product or service."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"custom-fields--configurable-options","__idx":2},"children":["Custom Fields & Configurable Options ",{"$$mdtype":"Tag","name":"a","attributes":{"id":"custom-fields-configurable-options"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Values from any custom fields & configurable options are passed into modules as parameters."," ","Passed as an array with the key being the name of the field or option."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example for a custom field called “Username”, would become $params[‘customfields’][‘Username’]."," ","Likewise, a configurable option named “Disk Space”, would become $params[‘configoptions’][‘Disk Space’]."]}]},"headings":[{"value":"Module Parameters","id":"module-parameters","depth":1},{"value":"Config Options","id":"config-options","depth":2},{"value":"Custom Fields & Configurable Options","id":"custom-fields--configurable-options","depth":2}],"frontmatter":{"title":"Module Parameters","seo":{"title":"Module Parameters"}},"lastModified":"2026-08-03T17:00:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/provisioning-modules/module-parameters","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}