Verified Trials
Verified trials are also node-locked. It ensures that trial doesn't reset even if user formats the machine. Each verified trial activation appears in the admin portal in the Trials -> Trial Activations section.
Adding a verified trial to your app
When your user installs your application for the first time, invoke ActivateTrial() LexActivator API functions to start the trial. The following sample code should be executed once after the user installs your app, ideally on a button click. Executing multiple times would unnecessarily re-validate the trial by contacting Cryptlex servers.
Once the trial is started you only need to invoke IsTrialGenuine() and GetTrialExpiryDate() LexActivator API functions at the start of your app after IsLicenseGenuine() check. Following is the sample code:
If IsTrialGenuine() does not return a success code you should re-activate the trial.
Extending trials
You can easily extend the trials so that your customers can get more time to evaluate your product. The trial extension has three steps:
Getting trial id
You need to get the trial id from your customer. To get the trial id in your app you need to invoke GetTrialId() LexActivator API function.
Extending the trial
Go to Trials -> Trial Activations section in the admin portal. Paste the "trial id" in the search to find the trial activation.
From the actions menu, click “Update Expiration Date”. In the form that appears, select the new expiration date using the date picker, then click Update.
Sync the trial activation
After extending the trial from the admin portal, ensure your application workflow invokes the SyncTrialActivation() LexActivator API function on the client to synchronize the trial activation.
This updates local trial data with any server-side changes, such as trial extensions, without requiring reactivation. It also refreshes trial activation metadata if it has been set on the client.