Categories: Licensing
Token-Based Software Licensing: Consumption-Based Licensing with CodeMeter
Software licensing does not have to be limited to users, devices, or license terms. Consumption-based licensing models allow software vendors to charge customers based on their actual usage. With its Unit Counter, CodeMeter provides proven technology for this purpose supporting both online and offline use.
Tokens as Units of Consumption
In consumption-based licensing, a token represents a defined amount of usage rights. Each action within a software application can be assigned its own token cost. For example, a simple calculation might cost one token, while a complex analysis requires ten or twenty tokens.
The available token balance decreases as the software is used. Once the balance is insufficient for a particular function, that function can no longer be executed. Other functions that require fewer tokens may still be available.
For software vendors, this model opens up new monetization opportunities. Customers no longer need to pay for unlimited usage. Instead, they purchase only the capacity they need.
Prepaid and Postpaid
There are two basic billing models:
- In the Prepaid Model, customers purchase a defined number of tokens in advance. These are credited to their license container and consumed as they use the software. Once the balance is depleted, customers can purchase additional tokens.
- In the Postpaid Model, billing takes place after usage. Customers initially receive a sufficiently large allocation. Actual consumption is measured regularly and reported to the software vendor, who calculates the number of units consumed based on the difference between the initial and remaining balances.
Both models use the same technical mechanism. The main difference lies in when billing occurs and how the commercial process is managed.
The Unit Counter as the Technical Foundation
CodeMeter has supported consumption-based licensing since its inception. The core feature is the Unit Counter, a license option that provides a protected counter within a CodeMeter license container.
Software vendors can initialize the counter with a defined value and later update it. Two options are available:
- Additive update: New units are added to the existing balance. For example, if a customer has 27 tokens remaining and purchases another 100, the new balance is 127 tokens.
- Absolute update: The counter is set to a specified value, such as 100 tokens, regardless of the previous balance.
This distinction matters because the two methods support different business models. An additive update is particularly useful for replenishing a balance, while an absolute update allows a new allocation to be set explicitly.
The protected application can only decrement the Unit Counter, while the balance can be increased only through a license updated issue by the software vendor.
Security Through Cryptographic Operations
A key advantage over a simple software counter is protection against tampering. Decrementing the Unit Counter can be tied to a cryptographic operation, such as encryption, decryption, or a digital signature.
This allows the consumption of a unit to be linked to a protected action.
One potential application is point-of-sale systems, where the number of invoices generated must be recorded in a traceable manner. For each invoice, a hash value can be generated and digitally signed along with the date and the current counter value.
The resulting logs make it possible to verify later that the recorded transactions remain unchanged and can be checked against the corresponding invoice records. Depending on the implementation, this can help detect tampering and improve usage traceability.
This principle applies beyond point-of-sale systems. Cryptographically linking consumption to processing can also be useful in industrial production, document processing, and other billable operations.
Online and Offline Without Restricting the Licensing Model
Many consumption-based business models require a permanent Internet connection. This is a natural fit for cloud services since consumption can be recorded and billed centrally.
CodeMeter takes a different approach: Tokens are securely stored in a license container with several container technologies available for this purpose.
CmCloudContainer allows licenses to be provided online. CmActLicense binds licenses to a specific computer, while CmDongle provides a portable, hardware-based license container.
This makes consumption-based licensing models possible even in fully isolated environments. Software can securely use tokens even in air-gapped systems with no connection to the Internet.
This is particularly relevant for industrial applications where production equipment is not permitted to communicate continuously with external systems for security or operational reasons.
Providing and Replenishing Token Packages
A typical use case with three software functions illustrates how easily this model can be implemented. The first function requires ten tokens, the second twenty, and the third just one token per execution.
These functions cannot be used without an available token balance.
The software vendor provides a license package containing 100 tokens through CodeMeter License Central and generates a corresponding ticket. The customer redeems the ticket through CodeMeter License Portal or WebDepot and activates the tokens in the license container of their choice.
The 100 tokens are then immediately available in the application. Each time a function is executed, the specified number of tokens is deducted.
Tokens are consumed and are not returned when the function finishes. One implementation detail is when tokens are consumed. This can be configured to occur either when the function starts or when it completes successfully. If the balance is insufficient for a particular function, execution is denied.
Customers can purchase another token package at any time and replenish their balance through the same activation mechanism. With this type of update, the remaining tokens are added to the new allocation. For example, if six tokens remain, adding 100 tokens brings the total balance to 106.
Activation can take place through CodeMeter License Portal, through WebDepot, or directly within the vendor’s own application. Updates can also be performed entirely offline by exchanging license files.
New Revenue Opportunities Through Recurring Consumption
Consumption-based licensing creates a direct link between actual software usage and revenue. Instead of relying solely on one-time license sales, software vendors can generate recurring revenue as customers purchase additional units.
Customers benefit from greater flexibility in usage. They do not need to purchase a comprehensive license for functions they rarely use. Instead, they can manage consumption according to their actual needs.
With the Unit Counter, CodeMeter provides the technical foundation for these models. The combination of protected consumption tracking, flexible deployment, and support for offline environments enables software vendors to implement usage-based business models even where conventional cloud-based billing systems are not suitable.
Key Advantage: Consumption-Based Licensing Works Offline, Too
Consumption-based business models are not limited to the cloud. CodeMeter’s protected Unit Counter allows usage units to be securely tracked and billed even without a permanent Internet connection. Software vendors can implement flexible prepaid and postpaid models even in fully isolated production environments. The technical infrastructure does not dictate the business model. Instead, the business model determines the most suitable licensing approach.
KEYnote 52 - Edition Fall/Winter 2026
