Description


This function expires a license.


Examples 




https://manage2.cpanel.net/XMLlicenseExpire.cgi?liscid=7216526&reason=Normal Cancellation - No Security Risk&expcode=normal


https://manage2.cpanel.net/XMLlicenseExpire.cgi?output=json&liscid=7216526&reason=Normal Cancellation - No Security Risk&expcode=normal


https://manage2.cpanel.net/XMLlicenseExpire.cgi?output=yaml&liscid=7216526&reason=Normal Cancellation - No Security Risk&expcode=normal




<?php 
include("cpl.inc.php"); 
$cpl = new cPanelLicensing("barney@example.com", "12345luggage"); 
$cpl->expireLicense(array( 
	"liscid" => "7216526", 
	"reason" => "Normal Cancellation - No Security Risk", 
	"expcode" => "normal")
	); 
?>




my $licenseManager = new cPanelLicensing(
    user => 'barney\@example.com',
    pass => '12345luggage'
);

my $liscid = $licenseManager->expireLicense(
    'liscid'  => '7216526',
    'reason'  => 'Normal Cancellation - No Security Risk',
    'expcode' => 'normal'
);




{
  "status": 1,
  "reason": "Expired 45-DAY-TEST license 7216526 in the 
'cPanel/WHM Auto Trial' group on 69.90.243.165 for reason: Normal 
Cancellation - No Security Risk.",
  "result": "OK",
  "licenseid": "7216526"
}




<XMLlicenseExpire licenseid="7216526" reason="Expired 45-DAY-TEST license 7216526 in the 
'cPanel/WHM Auto Trial' group on 69.90.243.165 for reason: Normal 
Cancellation - No Security Risk." result="OK" status="1"/>




--- 
licenseid: 7216526
reason: Expired 45-DAY-TEST license 7216526 in the 
'cPanel/WHM Auto Trial' group on 69.90.243.165 for reason: Normal 
Cancellation - No Security Risk.
result: OK
status: 1




Parameters

ParameterTypeDescriptionPossible valuesExample
licenseidinteger

Required

The license ID to expire.

A valid license ID.

The List License Information function returns a list of possible values.

 

7216526
reasonstring

Required

The reason to expire the license.

  • Normal Cancellation - No Security Risk.
  • Customer did not complete transaction - No Security Risk.
  • Customer did not complete transaction or you were unable to verify the customer - Security Risk.
  • Customer did not comply with policies (spam, payment, etc) - Security Risk.
  • Customer reversed charged - Medium Security Risk.
  • Customer provided compromised or fraudulent information - High Security Risk.
  • Other reason

Normal Cancellation - No Security Risk.

expcodestring

The license expiration reason code.

This parameter defaults to normal.

This parameter is required for distributors. 


  • normal
  • nocomplete
  • noverify
  • shutoff
  • chargeback
  • fraud
  • other
normal

Returns

ReturnTypeDescriptionPossible valuesExample
licenseidintegerThe expired license's ID.An integer value. 7216526
reasonstringThe function's result.A string value.


Expired 45-DAY-TEST license 7216526 in the 'cPanel/WHM Auto Trial' group on 69.90.243.165 for reason: Normal Cancellation - No Security Risk.


resultstringWhether the license expired.
  • OK — Expired.
  • "" — Did not expire.
OK
statusBooleanWhether the function succeeded.
  • 1 —Success.

  • 0 — Failure.
1