What you get
Turn trials on for a product and pick a length, say 14 days. When someone opens your app for the first time, the app makes one call, POST /v1/trials/start, with your product id and a fingerprint of the computer. Clavem answers with a license key that ends in 14 days, already activated on that computer.
From there it is an ordinary license. The app validates it at every launch, the signed token works offline, and when the end date passes, validate answers valid: false. Your app needs no second code path for “trial mode”. It needs a different screen for an expired license, and you probably have that already.
Four things come with it:
- One trial per device. Calling again from the same computer returns the same license.
- One per email by default. “Ask for an email” is on unless you turn it off, so each address gets one trial.
- A reminder email before the trial ends, for testers who gave an address.
- A count of who buys, so you can see what share of your testers become customers.
Trials are free: Pay As You Go does not charge for them. A running trial counts toward your plan’s license limit like any active license, and stops counting once the tester buys.
Why not a timer in the app, or a license by hand
You have two other ways to build a trial, and both are fine for some products. The longer comparison with freemium is in free trial versus freemium. Here is how the three differ in practice.
| A timer in the app | A license you create by hand | A trial started by the app | |
|---|---|---|---|
| Who starts it | The app, on first run | You, when someone asks | The app, on first run |
| Where the end date lives | On the computer | On Clavem | On Clavem |
| Reset by reinstalling the app | Often | No | No |
| Counts toward your plan | No | Yes, until it expires | No |
| Reminder and conversion numbers | You build them | No | Built in |
A timer needs no server, and that is its weakness: the start date sits in a file the user can delete. A license by hand has a server-owned end date, but someone has to ask for it, and you have to create it. A trial that the app starts keeps the server-owned end date and removes the asking.
Turn it on
Open the product in the dashboard and find Trials. Tick Offer a free trial, choose the length and save. There are five settings:
- Trial length: 1 to 365 days.
- Plan during the trial: optional. The trial license is on this plan, so your app reads its features from it. Giving the trial the top plan lets testers see the whole app.
- Ask for an email: on by default. Turn it off to let a trial start from the device alone.
- Reminder: how many days before the end the tester is emailed. The default is 3, and 0 sends none.
- Buy link: an https address. It goes in the reminder email and comes back to your app, so the app can show a Buy button.
You can also do it by asking Claude, once the MCP server is connected:
You: Turn on a 14-day free trial for Inkwell on the Pro plan. Ask for an email, remind people 3 days before the end, and send them to https://inkwell.example/buy.
Claude calls update_product with trial_days, trial_plan, trial_requires_email, trial_reminder_days and buy_url. The Admin API takes the same five fields on PATCH /v1/admin/products/:id. Inkwell is a made-up app here, as in the rest of the documentation.
Turning trials off later only stops new starts. Trials that are running keep going, and a device that already has one still gets it back.
Start it from the app
The call needs no secret. The product id is public, like a license key, so it can ship in your app.
curl https://clavem.io/v1/trials/start \
-H "Content-Type: application/json" \
-d '{
"product_id": 75,
"fingerprint": "90863d8344c32668298e6474aee0798ddd57bdf6c440915a4ffbd98765dd794a",
"instance_name": "Ada'"'"'s MacBook Pro",
"email": "ada@example.com"
}'
The answer is the activate response with one more object, shortened here:
{
"activated": true,
"license_key": {
"key": "6TQ8N-X4WPD-2HJ7C-RM9AV-K3E5F",
"status": "active",
"expires_at": "2026-12-11T09:14:02.331Z",
"trial": {
"ends_at": "2026-12-11T09:14:02.331Z",
"days_left": 14,
"buy_url": "https://inkwell.example/buy"
}
},
"instance": { "id": "47596ad9-a811-4ebf-ac8a-03fc7b6d2a17", "name": "Ada's MacBook Pro" },
"token": "sgt1.eyJ2IjoxLCJsaWQiOjUxMiwi…"
}
The app stores the key, the instance id and the token, exactly as it does for a paid license. On every later launch it validates, as in the quickstart. The status codes to handle are 201 for a new trial, 200 for a device that already had one, 409 when the email has a trial on another device, 422 when the product asks for an email and none was sent, and 404 when trials are off. The trials guide has all of them and a complete JavaScript function.
The fingerprint decides everything
A trial belongs to a product and a device, and the fingerprint is how Clavem recognises the device. It has to be the same each time the app runs on that computer and different on another. The operating system’s own machine id does that, so use it, hash it with a prefix of your own, and send the hash.
| Platform | Where the id comes from | What to use |
|---|---|---|
| macOS | IOPlatformUUID, read through IOKit |
Swift, as below |
| Windows | MachineGuid in the registry |
node-machine-id in Electron, the machine-uid crate in Tauri |
| Linux | The machine id file | The same two |
| Browser extension or web app | There is none | A random id, stored once |
Here is the Swift version:
import CryptoKit
import Foundation
import IOKit
func deviceFingerprint() -> String? {
let entry = IOServiceGetMatchingService(kIOMainPortDefault, IOServiceMatching("IOPlatformExpertDevice"))
guard entry != 0 else { return nil }
defer { IOObjectRelease(entry) }
guard let uuid = IORegistryEntryCreateCFProperty(entry, kIOPlatformUUIDKey as CFString, kCFAllocatorDefault, 0)?
.takeRetainedValue() as? String else { return nil }
let digest = SHA256.hash(data: Data("inkwell:\(uuid)".utf8))
return digest.map { String(format: "%02x", $0) }.joined()
}
I compiled and ran this on a Mac, and I ran the Node and Rust versions from the trials guide there too, outside Electron and Tauri. Each printed the same value on every run. The Swift and the Rust version printed the same 64 characters as each other, because both hash inkwell: plus the same hardware UUID. The Node version prints a different one, because node-machine-id already returns a hash and the snippet hashes that again. If you ship an app and a command-line tool for one product, use the same recipe in both, so the two agree.
Three habits help:
- If you cannot read an id, do not invent one. A random id that is not stored gives the tester a new trial at every launch.
- Send the same fingerprint when the tester activates their paid key. That is how Clavem links the buyer to the trial that was started on that computer.
- Send a hash, never the raw hardware id. For the trial, Clavem keeps only a SHA-256 hash of the product id and the fingerprint. The activation and the token carry the fingerprint as you sent it.
Machine fingerprinting pitfalls covers what changes these ids and what does not.
When the trial ends
Your app does not need a special case. The trial is a license, so validate answers 200 with valid: false, the status expired and an error message you can show. The token carries exp, so an app that checks it offline sees the end as well. To tell a trial from a purchase, look for license_key.trial.
When it has ended, show your buy screen and send the person to trial.buy_url, or to your own link if you left that empty. Keep their data reachable. A trial that locks people out of their own work turns a “maybe” into a “no”.
Then the tester buys through your Stripe checkout and receives a normal key by email. They paste it into the app, which activates it and stores it in place of the trial key. Clavem counts the trial as converted in either of two cases:
- A live license of the same product is issued to the email the trial started with. How it was issued does not matter: Stripe checkout, the dashboard, the API, MCP or an import.
- A paid key of the same product is activated with the fingerprint the trial started with. This catches the buyer who pays with another address, and the trial that started without an email.
A test-mode purchase never converts a trial, so testing your checkout with your own address does not touch the numbers.
What a trial does not stop
It stops the casual reset: delete the app, install it again, set the clock back. It does not stop a determined person. Someone with a second computer, a fresh virtual machine or another email address can start another trial. On Windows and Linux, a reinstall of the operating system gives a new machine id. In a browser, clearing the site’s data or removing the extension does the same.
“Ask for an email” makes it harder, but not impossible, because Clavem does not confirm addresses. That is also why every reminder email says why it was sent, and that nothing else will follow: anyone can type anyone’s address.
This is a fair price for a trial that starts without a form. Strict rules cost honest testers friction, and a trial that is hard to start converts fewer people. Stopping piracy without annoying customers takes the same view. If one tester abuses it, end that trial. There is a cap too: an account can have at most 10,000 trials running at once, and a trial never runs past 365 days after it started, however often you extend it.
Choosing the length, and the email
- Length. Long enough to finish one real task with the app, and short enough that the decision does not drift. You can extend a tester who needs longer, so start shorter.
- Email or not. Without an email, a trial starts with no friction, but you cannot remind the tester, and one person with two computers gets two trials. With an email, you get the reminder and one trial per address, at the price of a form field in the first launch. Which one wins depends on your app. Measure it on your own product.
- Plan. Put the trial on the plan you want people to try. Your app reads the features from the license as it does for a paid one.
Reading the numbers
The product’s Trials section shows how many trials started in the last 90 days and how they turned out: active, converted, expired or disabled. The conversion rate is converted divided by started. Trials that are still running have not had their chance to buy yet, so read the rate over a window that is longer than your trial.
You can read the same numbers with GET /v1/admin/trials/stats, or ask Claude how Inkwell’s trials did over the last 90 days, which calls get_trial_stats. I am not going to give you a typical rate. It depends on your app, your price and who finds you, and only your own numbers say anything about that.
Extending and ending
A tester writes to ask for a few more days. Use Extend in the product’s trial list, call POST /v1/admin/trials/:id/extend, or ask Claude, which uses list_trials to find the trial and extend_trial to extend it. You give a number of days or a new end date. A trial that is still running is extended from its end, and one that has already ended is brought back and counts from now.
end_trial ends a trial at once, for a tester who is abusing it. It is marked destructive, so a client can ask you first. A trial whose tester has bought cannot be extended or ended any more.
Trials do not accept the edits a normal license does. A change that extends or clears the end date, or changes the device limit, is refused with trial_license, so the rules above cannot be bypassed by accident. Use extend and end for dates.
Where to go next
The trials guide has the settings, every answer of the start call, fingerprint code for Swift, Electron, Tauri and browser extensions, the reminder rules and the limits. The API reference lists the endpoints, and the MCP documentation lists the four trial tools.
Questions
Does a trial cost me anything?
No. Pay As You Go does not charge for a trial license. While it runs it counts toward your plan's license limit like any active license. When a tester buys, they get a normal license, and only that one is counted from then on.
Can a tester reset the trial by reinstalling the app?
Not on the same computer. The trial belongs to the product and the device fingerprint, so starting again from that computer returns the same license, and after the end date it returns the expired one. A second computer, a fresh virtual machine or, on Windows and Linux, a reinstalled operating system gives a new fingerprint and can start another trial.
What happens to the trial when someone buys?
Clavem counts it as converted when a live license of the same product is issued to the email the trial started with, or when a paid key is activated with the same fingerprint. The trial key itself is not extended. The buyer gets a normal key, and your app should accept it in place of the trial key.
Can I give a tester more time?
Yes, from the dashboard, the Admin API or an MCP client such as Claude. You can add days or set a new end date, up to 365 days after the trial started. A trial that has already ended comes back, and the app sees it at its next validate.
Does Clavem check that the email is real?
No. Anyone can type any address, so the reminder email says why it was sent and that nothing else will follow. If you need confirmed addresses, collect them yourself before your app starts the trial.