Trial license
A trial license is time-boxed evaluation. The server stores an expiration derived from TrialPeriod / TrialPeriodHours on create; the SDK surfaces LicenseType.Trial and enforces expiry the same way as other types, with optional expiry warning hooks for UX.
Duration
Days + optional hours from issuance.
Activations
Same activation/session stack as paid types.
Upgrade path
Replace file + key when customer buys.
How it works
On the server, LicenseService.CreateLicenseAsync parses Type as Trial and, when trialPeriod / trialPeriodHours are provided, sets ExpirationDate to UtcNow + duration. The signed SDK model is TrialLicense with TrialPeriod and computed ExpirationDate.
Creating a trial license (dashboard)
- Select product and release; open license creation.
- Set
typeto Trial. - Set Trial period fields in the API (
trialPerioddays,trialPeriodHours0–23) or equivalent UI fields. - Provide Name, IssuedTo, optional notes and entitlements for feature-limited trials.
- Generate/download
license.binfor the evaluator.
Free-tier accounts may create Perpetual and Trial only; other types require the appropriate subscription feature flag on the server.
REST API
POST /api/Licenses—type: "Trial", plustrialPeriod/trialPeriodHours, requiredsoftwareReleaseId, etc.- Same validate/status/download endpoints as other types (see API reference).
SDK integration
Use ExpectedLicenseType = LicenseType.Trial if you ship a trial-only build; handle LicenseValidationStatus.Expired when the clock passed ExpirationDate.
Optional: set IncludeTrialInExpiryWarnings = true on LicenseClientOptions so ExpiryNotice / LicenseExpiringSoon fire before trial end (same mechanism as subscriptions).
using LicenPro.SDK;
using LicenPro.SDK.Enums;
await using var client = new LicenseClient(new LicenseClientOptions {
LicenseFilePath = "license.bin",
PublicKey = publicKeyBase64,
LicenseKey = trialKey,
ExpectedLicenseType = LicenseType.Trial,
IncludeTrialInExpiryWarnings = true
});
var result = await client.ValidateAsync();
if (!result.IsValid && result.Status == LicenseValidationStatus.Expired)
{
// Prompt purchase / enter paid key
}Offline evaluation (no server): ValidateOfflineAsync() when your policy allows cached or air-gapped trials.
