License Types
One of the fundamental building blocks of a license within our model is the license type. Every license issued will always have a type. In the vendor platform, this appears in many places, such as the license summary page as well as on the license detail page.

LicenseSpring defines 4 types of licenses:
Perpetual
Time-Limited
Subscription
Consumption
Let's dive into the different license types:
Perpetual License
A perpetual license does not expire. The is_expired field on a license check will always return False.
Statuses of a Perpetual License
Inactive— Thetimes_activatedfor this given license is0, meaning that this license has not been bound to a device.Active— Thetimes_activatedfor this field is greater than0, meaning that the license has been bound to at least one device.Disabled— The license has been disabled by the vendor; this will override other rules for this status.
Time-Limited License
Time-limited licenses always have a calendar date as a value in the Expiry date row that you can see in the vendor platform.
On a license check, the field is_expired will be True if the expiry date is earlier than the server's current date, and False if the expiry date of the license is at a future date than the server's timestamp.
Status of a Time-Limited License
Inactive— TheTotal Activationsfor this given license is0, meaning that this license has not been bound to a device.Active— TheTotal Activationsfor this field is greater than0, meaning that the license has been bound to at least one device.Disabled— The license has been disabled by the vendor; this will override other rules for this status.
License Duration
The duration (valid_duration) sets how long a time-limited license is valid after it is activated. Write it as a number followed by a unit:
y
1y
1 year
m
6m
6 months
d
30d
30 days
The same units apply to maintenance_duration.
If neither the order nor the license policy sets a duration, the license is valid for one year.
Setting a Pre-Determined Expiration Date
Users can set a pre-determined expiration date for a license that does not depend on the time of first activation by doing the following at time of issuance:

Subscription License
A subscription license synchronizes the status of the subscription with the state of the license.
Subscription Grace Period
Grace periods offer you the flexibility to determine a specific timeframe, measured in hours, subsequent to the expiry of the designated validity period.
During this defined interval, the license will retain its validity (isExpired() status will remain false), ensuring a seamless transition even after the official expiration.
Status of a Subscription License
Inactive— LicenseSpring received information from the external source of truth stating that the subscription is no longer active.Active— This is the default state of a subscription license, when it is created.Disabled— The license has been disabled by the vendor; this will override other rules for this status.
Consumption License
A consumption license, also known as a metered license, permits usage metering. Consumption licenses work by setting a value for the resource the vendor wishes to meter, and then recording the times that resource has been used. The resource can be anything that has a discrete value, for example:
Times the software was run
The number of API requests made
Number in minutes that a pooled resource was used
Credit
Consumption licenses support overages, total consumptions can be incremented or decremented (by adding a negative value), and the total consumptions can be periodically reset.

Unique Fields in a Consumption License

Max Consumptions: Number of "consumptions" granted to the end user.
Total Consumptions: Number of "consumptions" the end-user has currently consumed. This number must be less than or equal to the max consumptions + max overages.
Overages: If overages are allowed, then the software vendor can specify a value that the license can exceed the value for max consumptions by. Otherwise, the max overages is 0.
Consumption Period: If this field is set, then the value for total consumptions is reset to 0. The consumption period can be
Daily,Weekly,MonthlyorAnnuallyDailyis reset at midnight UTCWeeklyis reset on Monday at midnight UTCMonthlyis reset on the first day of the month at midnight UTCAnnuallyis reset on the first day of the year at midnight UTC
Status of a Consumption License
Not Activated— The Total Activations for the given license is0, meaning the license has never been activated or bound to a device. Newly created and never-activated licenses will appear in this state.Inactive— TheTotal Activationsfor this given license is0, meaning that this license has no active devices.Active— theTotal Activationsfor this field is greater than0, meaning that the license has been bound to at least one device.Disabled— The license has been disabled by the vendor; this will override other rules for this status.
Last updated
Was this helpful?