Subscription Licenses with Protection PLUS 5 SDK
Protection PLUS 5 SDK provides the flexibility to support various licensing types, including time-limited/subscription licenses. This article will guide you through configuring the necessary settings.
Why is the date field in SOLO Server labeled as "Download Until"?
In SOLO Server, the primary date field for a License ID can be used for multiple purposes. If you are using the file download feature through SOLO Server, this date field will always limit file download access in the Customer License Portal. This is why the date field is labeled as "Download Until".
This Download Until date can also be used as a license expiration date. In Protection PLUS 5 SDK, this date field gets passed into the XML license file as the EffectiveEndDate. You can choose to enforce that date as a license expiration and not allow the user to access your software:
- PLUSManaged: Validating Time-Limited and Subscription Licenses
- PLUSNative: Validating Time-Limited and Subscription Licenses
Alternatively, you could choose to use this date to limit access to newer versions of your software. Customers would have to renew their subscriptions to gain access to newer versions, but would always be able to use older versions. If you also hard-code a build date or release date into each version of your software, you can compare that date with the EffectiveEndDate in the license file to determine if they are licensed to use that version or not.
SOLO Server Settings for Subscription / Time-Limited Licenses
In SOLO Server, you will need to configure a subscription license in the Product Option settings. This can be done when using the Add Product Wizard, or when editing an existing Product Option directly:
Option Type: Activation Code with Days Left - This setting will reject an activation request if it is past the expiration date. Otherwise, it would complete the activation request and get the local license file, and then see it is past the expiration date based on the local license file check, which is not a user-friendly experience.
Trigger Code Number: 11 - The Trigger Code Number is an arbitrary value from 1 to 50 that your source code can interpret to determine the license type (PLUSManaged or PLUSNative). It can be passed through the offline Trigger Code Activation Process, which is typically only necessary when activating very remote cases that don't have internet access or allow file transfers. Historically, our previous licensing clients have used Trigger Code 11 to designate a subscription license, and our Protection PLUS 5 SDK sample projects are also configured this way.
Days to Download: (the number of days for the subscription period, such as 365 for a 1-year license) - This must be a non-zero value, otherwise it will set or display a "Download Until" date on the license record in SOLO Server.
Optional: Enable Reset expiration at first activation - This resets the expiration date to be "Days to Download" after the first activation date. It will initially be based on the license creation date.
Subscription settings when using FastSpring
When selling a recurring subscription through FastSpring, the settings can potentially be different. With FastSpring, the license is considered valid as long as the customer is still paying for the subscription.
See the Configuring FastSpring Contextual Store Integration for the full details on setting up the FastSpring integration.
Once the customer stops paying, the return.created or subscription.deactivated event from FastSpring tells SOLO Server to update the Status field of the License ID to "Expired". This is enforced the next time your software does a background check or Refresh with SOLO Server:
- PLUSManaged: Background Checking and Refreshing Licenses
- PLUSNative: Background Checking and Refreshing Licenses
The frequency at which validation should occur can be configured in the License Validation Options. It is important that you require periodic validation with SOLO Server, otherwise a user could avoid the expiration by blocking connection to SOLO Server.
If you only want to relay on the Status field to enforce the subscription, no expiration date is needed, as the expiration is enforced based on the Status field. The following settings can be used for a recurring subscription license sold through FastSpring:
- Option Type: Activation Code
- Trigger Code Number: 1 (this is an arbitrary value, but our sample projects use Trigger Code 1 to designate a license without an expiration date)
- Days to Download: 0
If you also want to also utilize an expiration date in addition to the Status field, then you can use the settings is the previous section:
- Option Type: Activation Code with Days Left
- Trigger Code Number: 11 (this is an arbitrary value, but our sample projects use Trigger Code 11 to designate a time-limited license)
- Days to Download: 365
Each time a customer makes a recurring payment on their subscription, the subscription.charge.completed event from FastSpring will increment the Download Until date of the license by the value set in the Days to Download field. Your software will still need to periodically Refresh with SOLO Server to get this updated date, and then it will be able to enforce license expiration based on this EffectiveEndDate in the local license file. When using this approach, the subscription charge date in FastSpring may get out of sync with the Download Until date if you allow the customer to make an overdue, which can be configured in FastSpring under Subscription Plans: Notifications and Retentions settings:
- Payment Reminders
- Overdue Notifications
- Deactivation Settings