Three ways to build a trial
| Key with an end date | Stripe free-trial subscription | In-app trial, no key | |
|---|---|---|---|
| Who starts it | You or the customer, by email | Customer, at Checkout | The app, on first run |
| Where the clock lives | Server | Stripe | The customer’s computer |
| Resets by reinstalling | No | No | Often yes |
| Converts to paid | New key, or extend the same one | The subscription bills itself | App asks for a key |
| Counts toward a Clavem plan | Yes | Yes | No |
An in-app trial needs no server, which is its appeal and its weakness. The first-run date is stored on the machine, so a reinstall or a clock change can restart it. The two server-side options cannot be reset that way.
A key with an end date
Create a license that ends in 14 days through the management API. In this example, 14 days from 19 November 2026 is 3 December:
curl https://clavem.io/v1/admin/licenses \
-H "Authorization: Bearer sk_clavem_…" \
-H "Content-Type: application/json" \
-d '{
"product_id": 75,
"email": "trial@example.com",
"activation_limit": 1,
"expires_at": "2026-12-03T00:00:00Z"
}'
After 3 December the License API answers with HTTP 200, valid: false and the error This license key has expired. The key is not deleted. If the customer decides to buy, a PATCH that moves expires_at forward, or to null, revives it. A purchase through Stripe, though, issues a new key, so your app must accept replacing the trial key.
A Stripe free-trial subscription
Stripe Billing can start a subscription with a free trial, and a subscription in a free trial has the status trialing (Stripe documentation, as of November 2026). Clavem treats trialing like active: the license stays valid. The checkout needs no payment, and Clavem issues licenses for sessions that needed none. Because trial handling in Stripe has several modes, make one test purchase with a test key and check the license’s expires_at before you go live.
Trial versus freemium
A trial is limited by time. Freemium is limited by features and never ends. A trial turns every feature on for a while, then asks for money. Freemium turns a few on forever and asks for money to get more.
How Clavem handles it
Clavem has no trial setting of its own. The two server-side options above are built from pieces it has: expires_at, and Stripe’s trialing status. Licenses created by hand count toward your plan, including the ones still inactive because nobody activated them yet. Once a license is expired it no longer counts. See license expiry.
Questions
Can a trial key be turned into a paid license?
In Clavem you can move the key's expiry forward, or to null, and the expired license comes back. A purchase through Stripe issues a new key instead, so the app should accept a replacement key.
What happens to the app when the trial ends?
The license answers valid false with an expired error. Decide in advance whether the app turns read-only, drops to a free tier or asks for a key, and keep the customer's data accessible.