Side by side
This page compares a license server you write and run with Clavem. The only outside facts are about Stripe’s webhook guidance, as of November 2026.
| Clavem | Building your own | |
|---|---|---|
| Price | Free for 50 active licenses; $29, $79 or $199 a month | Hosting, plus your time to write and maintain it |
| Fees on 100 sales of $49 | $29 plan; no cut of the sale | Hosting; no cut of the sale |
| Merchant of record | No | No; tax is the same question either way |
| License keys | Random keys, 125 bits each, created when Stripe confirms a payment | You write the generator and the Stripe handler |
| Device limits | Per license; buyer device page | A table, a limit and a way to free a seat |
| Offline checks | Signed sgt1 token, Ed25519 |
You choose the scheme, store the private key, and rotate it |
| Downloads | Releases, order page, signed links, update endpoint | Object storage, signed links, an update endpoint |
| API | Documented License, management and import APIs | Whatever you define |
| Migration path | Import file; CSV export; no lock-in | Your own database, exportable by you |
The parts people underestimate
Duplicate webhooks. Stripe’s fulfilment guide says your function must handle being called more than once for the same Checkout Session. The handler should record the session id with a unique constraint, so a second delivery cannot issue a second key:
// Sketch, not complete: verify first, then insert once.
const event = stripe.webhooks.constructEvent(rawBody, signatureHeader, endpointSecret);
if (event.type === 'checkout.session.completed') {
const inserted = await db.query(
'insert into licenses (checkout_session_id, key) values ($1, $2) on conflict (checkout_session_id) do nothing returning id',
[event.data.object.id, newKey()],
);
if (inserted.rowCount === 1) await emailKey(event.data.object, inserted.rows[0].id);
}
Stripe’s webhook documentation also says signature checking needs the raw request body, so a framework that parses JSON first breaks it.
Simultaneous activations. With a limit of three, two requests that each count two existing seats and each add one end with four. The check and the insert need one transaction or a lock. Clavem also treats a repeated fingerprint as the same seat, so a reinstall does not burn a second one.
Subscriptions. Decide what a failed renewal does, and whether a late payment revives the license. Clavem expires a subscription license at the end of the paid period plus three days of grace, evaluates expiry whenever the license is read, and revives it when the next invoice is paid. That removes the need for a background job that can fall behind.
Refunds. A refund or a chargeback has to disable the key, and the event arrives separately from the sale.
Key format. People retype keys from screenshots. Clavem uses Crockford base32, which has no I, L, O or U, and accepts the usual misreadings. A homemade format that mixes 0 and O creates support email.
Offline checks. A signed token needs a signing key per product, a rule for when it goes stale, and tolerance for a customer’s wrong clock. See offline verification.
Abuse. An open validation endpoint invites key guessing. Clavem limits each IP address to 120 requests per 60 seconds and each license key to 60, which your own server would need too.
Uptime on the launch path. If your server is down, every customer’s app is affected at startup. The usual answer is a stored signed token as a fallback, which brings you back to the previous point.
A break-even calculation
Clavem Indie is $29 a month, or $348 a year. If you value your time at $100 an hour, building pays off only if the build and a year of upkeep take less than 3.5 hours. Even at $40 an hour the figure is under nine hours. A first version alone will take longer. The comparison changes if the work is not billable time but a skill you want, or if the plan limit becomes a real cost: at 10,000 licenses, Studio is $79 a month, and at 50,000, Scale is $199.
When building your own is the better choice
- Your licensing model is unusual: floating seats, per-feature entitlements, metered usage. Clavem does none of these today.
- You need the data to stay in one country or one cloud account.
- Licensing is your product, or part of what you sell.
- You already run services with monitoring and on-call, so one more is cheap.
- You want no vendor on the launch path of your app.
When Clavem is the better choice
- You want keys working in a day and your time on the product.
- Ordinary per-device keys, subscriptions and refunds cover your model.
- You want buyers to have an order page and downloads you did not have to build.
- You want a way out: signed tokens that verify without Clavem, and a CSV export of every key.
Moving from your own server to Clavem
Select your keys into the import columns, which are documented in importing licenses: key, email, and optionally name, activation limit, status, expiry, creation date and the devices already activated. The page includes a SQL query and a script for Postgres, MySQL and others. Then change your app’s endpoint and ship an update. See moving from a homegrown server.
Questions
How long does it take to build a license server?
A first version that issues a key and checks it can take a day or two. The remaining work, refunds, renewals, duplicate webhooks, device limits that survive two simultaneous requests, signed offline tokens, download links and backups, is where the time goes, and it recurs as maintenance.
Can I move from my own license server to Clavem later?
Yes. Select your keys, buyer emails, device limits, expiry dates and activated devices into a CSV or JSON file, or send them to the import API from a script. Keys are kept as written, and the import is safe to run again.
What if Clavem closes?
Each response carries a token signed with a key that belongs to your product, so apps keep verifying valid licenses without a call to Clavem, and you can export every key and buyer as CSV at any time. The License API shape also matches Lemon Squeezy's, which keeps a move to another service or your own server to a hostname change and an import.