· CoreInto Team · 2 min read

How to sell software licences from your billing system

Selling a script, a plugin or a control panel? What a licensing system has to do, and how CoreInto's Licensing Manager does it with signed answers.

A licence key bound to a domain, with a signed answer verified by a public key

Many hosting companies end up selling software of their own: a WordPress plugin, a billing module, a small control panel. Selling it from the same billing system as your hosting keeps one client account, one invoice and one support desk. Here is what a licensing system has to do, and what to watch for.

The five jobs of a licensing system#

  1. Issue a key when an order is paid, and show it to the client.
  2. Bind the key to where it is used: a domain, an IP address, a folder or a machine.
  3. Answer check-ins from the software: is this key valid, for which product and edition, until when?
  4. Follow the subscription: suspend the licence when the invoice is unpaid, restore it when it is paid.
  5. Ship updates that the software can trust.

Why answers must be signed#

The weak point of most licensing is the answer. If the software simply asks "is this key valid?" and believes "yes", anyone can point it at a fake server that always says yes. The answer must be signed with a private key that only your licence server holds, and the software must check the signature with the public key it carries. A forged server cannot produce a valid signature.

CoreInto's Licensing Manager signs every answer with ECDSA P-256, and its version 2 answers are JWT tokens signed with ES256, so standard libraries in any language can check them.

Binding without support tickets#

Clients move servers. If every move needs a ticket, licensing becomes a support burden. Let clients reissue their own licence from the service page, with a limit on how often, and bind it again at the next check-in.

Editions, trials and grace#

One program often comes in several editions. Put the edition, account limits and features in the signed answer, and let the software read what it may do. Trials need an end date; paid licences need grace days so a missed check-in does not stop a customer's business.

Updates the software can trust#

Publish releases with a signature made by a release key you keep offline. The software downloads the release and installs it only if the signature matches. A compromised download server then cannot push a bad update.

Doing it in CoreInto#

Every CoreInto plan includes the Licensing Manager: set a product's module to Licensing, choose the key prefix, the binding and the editions, and publish releases with tools/release.php. The Licensing Manager page and the developer reference have the details. CoreInto sells its own licences, and those of intoPanel and StackRegent, this way.