A license policy is a templating feature within LicenseSpring to easily issue a new license according to a preset of entitlements. There are a few benefits to using license policies:
- Less error-prone: If you defined dozens of features and custom fields, and primarily sell your product in a few combinations of these, then license policies help you avoid configuration mistakes
- Easier to integrate with other systems: Let's say you would like to sell licenses of your app through Stripe, the license is time limited, and has 3 of a product's 7 features, with a max activations of 5. Instead of setting up your order webhook with each of these entitlements defined on your Stripe Integration, you can just define a license policy and select it in Stripe.
Every product has at least 1 license policy, and there must be at least 1 default license policy.
A License Policy is only a template. Once a license is issued, you can modify certain parts of the entitlements (eg: extend the validity period, change the max activations etc.).
Navigate to the license detail page and click on "License Policies" and then "Add license policy"
On the License Policy editor, the required fields are that you give the license policy a name and a code. All other parameters are optional.
- Name Required
- Code Required, immutable
- License type Required, can be Perpetual, Time-limited, Subscription, or Consumption
- Is trial Optional, Boolean determining whether the license issued is a trial license
- Max activations Must be a Positive INT
- Allow unlimited activations Boolean
- Has device transfer limit Whether you wish to control the number of times a license can be moved from one device to another
- Prevent virtual machine Boolean value sent to eht SDKs to detect and block apps running in Virtual environments
- Offline Floating license Boolean, setting entitlements for a floating server that is deployed.
- is floating cloud Boolean setting concurrency over http
- Enable Maintenance period Set a maintenance window which starts counting after the initial activation of the license.
You can add or remove product features to the license policy. For consumption features, you can set different values for Max consumptions , max overages and for periodic resets .
You can select the values of the product custom fields you wish to override in the dropdown.
The Policy name and the policy code are required fields. You cannot change the policy code once the license policy is defined.
Through the vendor platform: navigate to Licenses > Issue Licenses. Add order and customer information and hit next. Click "Add product" and you will see the product selector screen. From here, you can choose which license policy to use when issuing a license for that given product:
If you wish to use the License policy as a starting point when configuring the license you are issuing, then enable Use custom license values . The editor will start with all of the options configured in the license policy:
License policy code can be added as a custom attribute to the Stripe product price so that any subscription created using this price will create licenses using that specific license policy.
More details can be found here .