GuideApr 12, 2026 • 5 min read
The Complete Guide to Selling Software Licenses with WHMCS
🚀 WHMCS License Management System – Complete Guide
If you develop PHP-based software — WHMCS modules, WordPress plugins, SaaS tools, or standalone applications — you’ve probably asked:
“How do I sell licenses and actually enforce them?”
This guide explains everything — from how licensing works to full integration with your software.
🤔 Why You Need a Licensing System
- ❌ Share software with unlimited users
- ❌ Install on unlimited servers
- ❌ Cancel payment but continue using
- ❌ Redistribute your product illegally
Solution: Require your software to validate with your server before running.
🏗️ How the System Works
1. Server Module (licensemgr)
- Create License
- Suspend (overdue invoices)
- Unsuspend (after payment)
- Terminate
- Renew
2. Addon Module (licensingmanager)
- Dashboard Overview
- License Search
- Ban Control
- Validation Logs
- Integration Guide
🔑 License Key Generation
Example Key:
MYAPP-A7F2-K9E3-B4D1-C8H6
| Setting | Description | Example |
|---|---|---|
| Prefix | Brand Identifier | MYAPP- |
| Length | Key Length | 16 |
| Format | Character Type | Alphanumeric |
| Validity | License Duration | Billing Cycle |
🌐 License Validation
POST https://your-whmcs.com/modules/servers/licensemgr/api/validate.php
{
"license_key": "MYAPP-XXXX",
"domain": "example.com",
"ip": "1.1.1.1",
"directory": "/home/app"
}
✔ Checks include:
- License exists
- Status is active
- Domain/IP match
- Not expired or banned
🔄 First-Use Domain Binding
On first validation, domain + IP are locked to the license.
Customers can reissue licenses (limited usage).
🧑💻 SDK Integration
Option A: Simple Script
require_once 'check_license.php';
if (!$licenseValid) {
die('Valid license required.');
}
Option B: OOP Class
$license = new LicenseClient('URL','KEY','SECRET');
if ($license->isValid()) {
echo "Active";
}
🛡️ Ban Control
- Block IPs
- Block Domains
- Block License Keys
📊 Validation Logs
| Field | Description |
|---|---|
| License Key | Validated key |
| Domain | Request origin |
| IP | Server IP |
| Result | Status result |
| Timestamp | Time of request |
👤 Client Area
- View license
- Check status
- Reissue license
- Download files
⚙️ Automation
| Event | Action |
|---|---|
| Payment | License created |
| Overdue | Suspended |
| Paid | Reactivated |
| Cancelled | Terminated |
📦 Package Structure
licensemgr/
licensingmanager/
sdk/
api/
templates/
🚀 Getting Started
- Upload modules
- Activate addon
- Create product
- Configure license settings
- Integrate SDK
- Start selling 🎉
💰 Business Impact
| Without | With System |
|---|---|
| Free sharing | Controlled usage |
| No visibility | Full logs |
| Manual work | Automation |
| Revenue loss | Protected income |
✅ Start Protecting Your Software Today
Build software. Sell licenses. Protect your income.
Order Now →