Skip to content
CWPControl Web PanelDocumentation
  1. Home
  2. Docs
  3. CWP Billing
  4. Servers
  5. Reselling CWPpro licences

Reselling CWPpro licences

Updated

CWP partners (with an active CWPpro Partner licence) can sell CWPpro licences to their own customers with CWP Billing. The customer orders a CWPpro licence in your client area, enters the IP of their server and pays. The billing then registers that IP in your partner account in the CWP Reseller Manager (reseller-manager.control-webpanel.com), and the server becomes CWPpro within minutes. When the service is suspended or cancelled, the IP is removed again.

You set your own price. Every licensed IP counts against the licence limit of your partner account and is billed to you by CWP as usual.

Requirements

Note: An active CWPpro Partner licence is required. Reselling works only with a CWPpro – Partner service ordered from CWP (https://control-webpanel.com/licenses-for-partners, billed at https://support.centos-webpanel.com). It gives you a partner account in the CWP Reseller Manager with a number of licences (the IP limit). Without it, or when it is suspended or cancelled, the billing cannot add licences, and the licences already added stop working.

  • An active CWPpro – Partner licence with free licences in your partner account. More licences: upgrade the number of licences of your CWPpro – Partner service.
  • CWP Billing 1.0.32 or newer.
  • Your API key and API secret: Reseller Manager → API Access. Keep the secret private: anyone who has it can change your IP list. Create new key and secret there replaces both, and the old ones stop working at once.

1. Add the Reseller Manager as a server

Open Servers → Add server:

FieldValue
NameFor example CWP partner licences
Panel typeCWPpro licence (CWP partner)
Hostnamereseller-manager.control-webpanel.com
API port443
API keyYour key and secret joined with a colon: API_KEY:API_SECRET
Check SSLOn

Click Save server, then Test connection. It shows how many IPs are licensed in your partner account.

Put the server in a server group (Servers → server groups), so the product can use it.

2. Create the product

Open Catalogue → Products → Add product:

  1. Type: License (or Other). Pay type: Recurring. Set your prices, for example monthly and yearly.
  2. Automation → Module: CWPpro licence (CWP partner). Server group: the group from step 1. Create the account: when the first invoice is paid (or manually, if you want to check every order first).
  3. Save, then add a custom field on the product page:
SettingValue
NameServer IP (exactly this name)
TypeText
RequiredYes
Show on order formYes
Visible to the clientYes
Client can change itNo (you move licences yourself, see below)
Validation/^\d{1,3}(\.\d{1,3}){3}$/ (optional, accepts only an IPv4 address)

The order form now asks for the server IP and no domain.

3. What happens on an order

EventWhat the billing does in your partner account
The order is paid (or accepted)Adds the Server IP. The service shows the IP and becomes Active.
The service is suspended (overdue)Removes the IP. The customer’s server falls back to the free CWP until the invoice is paid.
The overdue invoice is paidAdds the IP again (unsuspend).
The service is cancelled or terminatedRemoves the IP for good.

Every call and its answer is in the service’s Module log.

Moving a licence to another IP

When a customer moves to a new server:

  1. Open the service, change the Server IP field to the new IP and save.
  2. Click Apply product package in the Server box.

The billing adds the new IP and removes the old one. If you want customers to change the IP themselves, tick Client can change it on the custom field. You still click Apply product package to move the licence.

Your licence limit

The Reseller Manager refuses new IPs once your partner account is at its limit. The order then stays Pending and the module log shows User have exceeded ip limit (code 108). Order more partner licences, then click Create account on the service (or Orders → Accept).

Troubleshooting

Message in the module logMeaning and fix
Invalid API Key (code 102)The key part of API_KEY:API_SECRET is wrong, or the keys were renewed. Copy them again from API Access.
Invalid Hash key (code 103)The secret part is wrong.
The user account is suspended (code 109)Your partner account is suspended. Contact CWP support.
IP Address already exist (code 107)The IP is already licensed, in your account or another one. Check the IP with the customer.
IP Address is not valid (code 107)The Server IP field does not hold a valid IPv4 address.
User have exceeded ip limit (code 108)Your partner account is full, see above.
Enter a valid IPv4 address in the service’s “Server IP” fieldThe product has no custom field named Server IP, or it is empty.

The customer’s server checks its licence at https://reseller-manager.control-webpanel.com/license.php?ip=SERVER_IP: it answers success for a licensed IP.

Questions

Need help setting it up, or a different flow (for example licences bundled with a VPS)? Open a ticket at https://support.centos-webpanel.com. Missing features and modules are developed for free.