Expire Licenses — XMLlicenseExpire.cgi
This Manage2 function allows you to expire an existing license. When a license is expired, cPanel & WHM cannot be accessed on that license's IP.
- liscid (integer) — The ID number of the license you wish to expire.
- reason (string) — The reason for expiring the license.
- Note: This is useful when managing multiple licenses.
- expcode (string) — The reason code for expiring the license (distributors only).
- Valid Codes:
- normal (Normal Cancellation - No Security Risk)
- nocomplete (Customer did not complete transaction - No Security Risk)
- noverify (Customer did not complete transaction or you were unable to verify the customer - Security Risk)
- shutoff (Customer did not comply with policies (spam, payment, etc) - Security Risk)
- chargeback (Customer reversed charged - Medium Security Risk)
- fraud (Customer provided compromised or fraudulent information - High Security Risk)
- other (Other reason)
- licenseid (string) — The ID of the license that has been expired.
- reason (string) — Describes, in English, the result of the request.
Expired 45-DAY-TEST license 7216526 in the 'cPanel/WHM Auto Trial' group on 18.104.22.168 for reason: Normal Cancellation - No Security Risk.
- status (integer) — The status of the license expiration.
1 — The license has been successfully expired.
0 — The request has failed.
Using HTTP (direct API call)
in a web browser will produce XML output similar to the following:
<XMLlicenseExpire licenseid="7216526" status="1"
reason="Expired 45-DAY-TEST license 7216526
in the 'cPanel/WHM Auto Trial' group on 22.214.171.124
for reason: Normal Cancellation - No Security Risk."/>
Calling the function using the URL above will return XML data by default. To change the output format that will be returned, use either of the following URLs:
- JSON —
- YAML —
For more information about each of these output types, visit our Choosing an Output Type
Using a Perl module
The following is an example of a Perl module that will call
. You can use this module to pass input variables to a Manage2 API function. You will need to edit the example below to suit your needs.
my $cpl = cPanelLicensing->new(user => $user, pass => $pass);
$cpl->expireLicense(liscid => 7216526, expcode => "normal");
In the example above,
is meant to stand for the license ID corresponding to the license you wish to expire.
Learn more about using a Perl module to call API functions
Using a PHP class
The following is an example showing how to call the cPanelLicensing PHP class. You can use this class to pass input variables to the Manage2 API using a few short calls.
$cpl = new cPanelLicensing($user, $pass);
$cpl->expireLicense(array( "liscid" => "7216526", "expcode" => "normal"));
$user and $pass represent the username and password for your Manage2 account.
Learn more about using a PHP class to call API functions
Topic revision: r20 - 21 Feb 2013 - 20:10:22 - Main.ColinShannon
ManageTwo.ExpireLicense moved from Sandbox.ExpireLicense on 21 Jul 2009 - 19:13 by Main.JustinSchaefer
- put it back