Timed Licenses

What is a timed license?

A timed license is a license that has a fixed-duration, i.e. an expiration date. A timed license can be used to implement a variety of different time-based licensing models:

How do I implement a timed license?

Configuring a timed license type is simple. You will want to create a new Policy resource, or modify an existing Policy, and set the Policy's duration attribute to the expiration timeframe that you would like to apply to any license which implements the Policy moving forward.

Then, within your software, you will want to integrate the following request flow:

Diagram of validating a timed license key

The duration of a Policy is measured in seconds:

Timeframe Duration in seconds
1 Day 86400
1 Week 604800
2 Weeks 1209600
1 Month 2592000
1 Year 31557600

When a license implements a fixed-duration Policy, the expiration will automatically be applied based on the Policy's duration and the license's created timestamp.

license.expiry = (license.created + policy.duration)

Once a license's expiry has been reached, subsequent license validations will respond with an EXPIRED validation code and the license will be considered invalid. A license can be renewed at any time using the license's renew action.

Subscription licenses

When it comes to Software as a Service (SaaS) licensing, or other types of licenses with timed, renewable maintenance and servicing contracts, subscriptions are the way.

Subscription licenses can be implemented in a couple different ways. If you have a payment provider, such as Stripe, we recommend tethering the license's expiration date to the subscription period. This can be accomplished using webhooks.

Outside of a payment provider tether, a license's expiration can be extended at any time using the renew license action. This can be used to automatically renew licenses. When a license is renewed, its expiry is extended by the Policy's duration.

license.expiry += policy.duration
If you're implementing a subscription licensing model, we'd love to hear from you. We're looking to expand our subscription model, so please let us know how we can improve our offering and better meet your requirements.

Timed trial licenses

You would implement this just like a regular timed license, except the Policy will likely have a shorter duration, and possibly a different set of entitlements. To determine if a license is a trial license within your software, you can compare the trial Policy's ID to the license's current policy relationship.

For trial licenses, it's recommended to set the Policy's fingerprint uniqueness strategy to PER_PRODUCT or PER_POLICY to ensure that a particular machine fingerprint cannot be shared across many trial licenses.

To convert a trial license, you can transfer the license to a different Policy.

Offline capability

Timed licenses can be configured to be offline-capable. To do so, configure the Policy to utilize a cryptographic signing or encryption scheme, which will allow you to verify the authenticity of license keys in offline environments. You can embed an expiration inside of the license key itself, which can be decoded and utilized offline.

Perpetual LicenseTimed LicenseFloating LicenseNode‑locked LicenseFeature License
Expiration DateNoYesOptionalOptionalOptional
Activation LimitsOptionalOptional> 01Optional
Feature LimitsOptionalOptionalOptionalOptionalYes
Offline SupportYesYesYesYesYes
Learn MoreLearn MoreLearn MoreLearn More