LicenPro
DocumentationTrial license

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)

  1. Select product and release; open license creation.
  2. Set type to Trial.
  3. Set Trial period fields in the API (trialPeriod days, trialPeriodHours 0–23) or equivalent UI fields.
  4. Provide Name, IssuedTo, optional notes and entitlements for feature-limited trials.
  5. Generate/download license.bin for the evaluator.
Plans

Free-tier accounts may create Perpetual and Trial only; other types require the appropriate subscription feature flag on the server.

REST API

  • POST /api/Licensestype: "Trial", plus trialPeriod / trialPeriodHours, required softwareReleaseId, 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.