A client-owned service.
A Service is an instance of a Product purchased by a Client by way of an Order and, optionally, provisioned to a Server by a provisioning module.
Services are attached to a Domain name. The status of the attached domain name is tracked here.
The payment gateway used, the recurring amount and billing cycle, as well as the initial payment used to activate this product are recorded here.
If the provisioning module provides instrumentation for tracking bandwidth and disk space usage, it is tracked and stored in this object.
If the Service requires a username and password to utilize, those are tracked here.
If this Service is suspended, the reason for the suspension is stored here. Instanced Services can also be made immune to automatic suspension by WHMCS, for a specific time period or until suspensions are intentionally re-allowed. This can allow the operator to cause a Service to remain active despite WHMCS's billing rules. (For example, the operator may flag the operator's own websites as immune from suspension, while utilizing all the other management features of WHMCS).
Dedicated IP addresses and the nameservers for the Domain attached to this Service are stored in this object.
This Service can act as a parent to various Service\Addons, which provide additional features beyond the configuration of the Product this Service was instanced from.
Any CancellationRequests for this server can also be accessed via this object.
|int||$id||Unique ID for this service.|
|int||$clientId||ID of client who owns this service.|
|int||$orderId||ID of order used to purchase this service.|
|int||$packageId||ID of package purchased in the order for this service.|
|int||$serverId||ID of server this service has been provisioned to.|
|Carbon||$registrationDate||Date this service was purchased.|
|string||$domain||Domain name this service is registered under.|
|string||$paymentGateway||English language internal name for the gateway used to originally purchase this service.|
|float||$firstPaymentAmount||The first amount paid for this service.|
|float||$amount||The recurring payment amount for this service.|
|string||$billingCycle||English language internal name of this service's billing cycle from this set: 'Free Account', 'One Time', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Biennially', 'Triennially'|
|Carbon||$nextDueDate||Date next payment is due.|
|Carbon||$nextInvoiceDate||Date next invoice will be generated.|
|Carbon||$terminationDate||Date the service was Terminated or Cancelled.|
|Carbon||$completedDate||Date the service was Completed.|
|string||$domainStatus||English language internal name of status of this service, from this set: 'Pending', 'Active', 'Suspended', 'Terminated', 'Cancelled', 'Fraud' (Additionally custom status may exist)|
|string||$username||Username associated with this service (for external control panels, etc)|
|string||$password||Password associated with this service.|
|string||$notes||Admin custom notes, with expectation that client will not see them.|
|string||$subscriptionId||If the service is a recurring service, and a payment gateway which supports subscriptions have been used (such as PayPal), the subscription ID for the payment gateway is stored here.|
|int||$promotionId||ID of promotion used when purchasing this service, or null otherwise.|
|string||$suspendReason||An admin provided string as to why a suspension was enacted on this service.|
|bool||$overrideAutoSuspend||If true, WHMCS will not attempt to automatically suspend this service.|
|Carbon||$overrideSuspendUntilDate||If Auto Suspend is not overridden, on this date the service will be automatically suspended.|
|string||$dedicatedIp||If the service provides a dedicated IP address, it is stored here.|
|string||$assignedIps||If the service is assigned to IP addresses, those addresses will appear as comma delimited strings here.|
|string||$ns1||If the service requires a nameserver (such as a domain name), the first nameserver is stored here.|
|string||$ns2||If the service requires a second nameserver, that nameserver is stored here.|
|int||$diskUsage||If the service's module provides disk usage telemetry, that value is stored here.|
|int||$diskLimit||If the service was purchased with a disk usage limit, that limit is stored here.|
|int||$bandwidthUsage||If the service's module provides bandwidth usage telemetry, that value is stored here.|
|int||$bandwidthLimit||If the service was purchased with a disk usage limit, that limit is stored here.|
|Carbon||$lastUpdateDate||Date this service was last modified.|
|Carbon||$createdAt||Date this service was created.|
|Carbon||$updatedAt||Date this service was last modified.|
|Client||$client||Client object which owns this service.|
|Product||$product||Product associated with this service.|
|Addon||$addons||Addons purchased alongside this service.|
|CancellationRequest||$cancellationRequests||Any cancellation requests related to this service.|
|Queue||$failedActions||Any failed actions related to this service.|
|Return Type||Method Name||Description|
|BelongsTo||client()||Each service belongs to one client.|
|BelongsTo||product()||Each service is an instance of a product.|
|HasMany||addons()||Each service can have many addons|
|HasMany||cancellationRequests()||Each service can have many cancellation requests|
|bool||hasAvailableUpgrades()||Determine if a service has available upgrades.|
Each service belongs to one client.
Each service is an instance of a product.
Each service can have many addons
Each service can have many cancellation requests
Determine if a service has available upgrades.