Configuring a Subscription License (SOLO Server + Protection PLUS 5 SDK)
Goal
Set up a time-based subscription license that you configure in SOLO Server and that your PLUS5 application enforces on the customer's computer.
Using Instant Protection PLUS 3?
Time-based and periodic (subscription) licenses apply to Instant Protection PLUS 3 as well. The full IPP3 walkthrough is covered in the manual: Periodic Activations with SOLO Server.
How it actually works (read this first)
SOLO Server has no single "subscription" switch when using PLUS5, and that is intentional. You do not flip a "subscription = on" setting. Instead you configure a Product Option whose generated license carries data (an expiration date and/or a status), and your PLUS5 application decides what that data means when it validates the license. SOLO produces the data, and PLUS5 enforces it.
The one field that ties the two products together:
SOLO Server's "Download Until" date is written into the PLUS5 XML license file as
EffectiveEndDate. Your application enforces expiration by validating againstEffectiveEndDate.
The field is labeled "Download Until" because SOLO also uses it to limit file download access in the Customer License Portal. It doubles as your license expiration date.
There are two ways to enforce a subscription. Pick the one that fits how you sell:
- A. Date-based. The license expires on a date (
EffectiveEndDate). Best for fixed terms such as a one-year license. Works fully offline after activation. - B. Status-based (recurring billing). The license stays valid while the customer keeps paying, and the SOLO Status field changes to Expired when they stop. Best for auto-renewing subscriptions such as FastSpring. Requires periodic re-validation with SOLO.
A. Date-based subscription
1. Create the Product Option - SOLO Server
Use the Add Product Wizard (or edit an existing Product Option) with these settings:
Option Type: Activation Code with Days Left. This rejects an activation that is already past expiration, which is cleaner than activating and then failing the local license check.
Trigger Code #: 11. This is an arbitrary value from 1 to 50 that your code reads to identify the license type ( PLUSManaged, PLUSNative). Our sample projects use 11 for a subscription, and Instant Protection PLUS 3 uses the same convention, so keeping it consistent is helpful.
Days to D/L: the subscription length in days (for example, 365 for one year). This sets the Download Until date.
Reset Expiration at Activation (optional). Starts the term at first activation instead of at license creation, so the customer always gets their full subscription period.
2. Generate or adjust the license - SOLO Server
A license created from this option defaults to the Days to D/L term. You can change it when adding a license manually or by editing the license.
3. Enforce it - your PLUS5 application
On validation, confirm the current date is not past EffectiveEndDate, and guard against a tampered system clock. PLUS5 provides ready-made validators (see PLUSManaged or PLUSNative: Validating Time-Limited and Subscription Licenses): LicenseEffectiveDateValidation for the dates, and SystemClockValidation to catch clock tampering. The EffectiveEndDate lives in the license file schema.
4. Verify
Activate a test license, set the system clock past the term, and confirm your application treats the license as expired and that clock tampering is caught.
B. Status-based subscription (recurring billing, for example FastSpring)
Here the license is valid as long as the customer is paying. You can enforce this by status alone, or by status plus an auto-extending expiration date.
1. Create the Product Option - SOLO Server
Status only (no expiration date):
Option Type: Activation Code · Trigger Code #: 1 (sample projects use 1 for a license with no expiration date) · Days to D/L: 0
Status plus an auto-extending date (each payment pushes the term forward):
Option Type: Activation Code with Days Left · Trigger Code #: 11 · Days to D/L: 365 (or your billing period)
With the second option, each successful recurring charge (the subscription.charge.completed event from FastSpring) increases the Download Until date by the Days to D/L value, so the EffectiveEndDate in the license file moves forward automatically.
2. Wire up the billing events - SOLO Server
With FastSpring, a return.created or subscription.deactivated event sets the License ID Status to Expired when the customer stops paying.
3. Enforce it - your application
The expired status (and any updated expiration date) is picked up the next time your application does a background check or refresh ( PLUSManaged, PLUSNative). Require periodic validation in License Validation Options, otherwise a user could avoid expiration by blocking access to SOLO Server.
4. Verify
Activate, cancel the test subscription, then confirm the next refresh expires the application. For the auto-extending option, make a test recurring charge and confirm the Download Until date moves forward.
Reference
- SOLO Server: Add Product / Option, License Details, License Validation Options
- PLUS5: Validating Time-Limited and Subscription Licenses ( PLUSManaged, PLUSNative), Trigger Codes