The answer
Stripe does not generate license keys. There is no key object, no “send the buyer a code” setting in Checkout, no validation endpoint your app can call, and no activation count. Stripe’s own fulfilment guide describes the pattern for anything that must happen after payment: you write a function, and webhooks trigger it. What the function does, such as creating a key, is up to you.
The question keeps coming up because several Stripe features sound close. This article goes through each one, so you can see exactly where it stops.
What Stripe offers and where each stops
| What you need | Closest Stripe feature | The gap |
|---|---|---|
| A unique key per purchase | None. A Checkout Session has an id (cs_...), a Customer has an id (cus_...). |
Neither is a secret credential. Both leak into URLs and receipts. |
| A key per seat when quantity is above one | Line item quantity on the Checkout Session |
Stripe records the number. You must create that many keys. |
| Proof that a customer has paid | The Checkout Session payment_status and the Subscription status |
Your server can read them with a secret API key. Your app cannot. |
| “Is this subscriber allowed this feature” | Billing Entitlements and the active entitlements list | A server-side answer, per customer, for subscriptions. Not offline-verifiable. |
| Storing a custom value next to a purchase | metadata on Products, Prices, Sessions and Customers |
Storage only. No validation, limits or revocation. |
| Letting a buyer see their purchase | Receipts and the customer portal | No license key, no devices, no downloads. |
| A download for the buyer | Nothing. Stripe’s fulfilment guide, which covers Payment Links too, tells you to write the function yourself. | You host and protect the files. |
| Cutting off a refunded or cancelled buyer | Events such as charge.refunded and customer.subscription.deleted |
Stripe tells you. Turning that into a revoked key is your code. |
Entitlements are close, but they are not keys
Stripe’s Entitlements feature deserves the longest look, because it is the nearest thing. You create a Feature in Stripe Billing with a lookup key, attach it to a Product, and when a customer’s subscription is active Stripe maintains an Active Entitlement for that customer. Stripe sends an entitlements.active_entitlement_summary.updated event when it changes, and your server can list a customer’s active entitlements through the API. The documentation’s examples are things like API access, an AI assistant and extended data retention.
That is useful when you run a web service and want pricing changes without code changes. It does not solve the desktop-app problem, for three reasons:
- It answers a server, not an app. Listing entitlements needs a Stripe API request with a secret key. Stripe’s best-practice guide says secret keys must stay in your server environment and that client tools and apps should embed publishable keys only, because “unauthorized parties can unpack applications to search for embedded keys”. A restricted key is still a secret.
- It needs the Stripe customer id on the device. Your app would have to know
cus_..., which the buyer never sees. - It has no offline story and no device count. A laptop on a flight cannot ask Stripe anything. Nothing records that a key is in use on three machines.
You can still use Entitlements behind your own server as the source of truth for “is this subscription active”. They are an input to a licensing layer, not the layer.
Why you should not call Stripe from the app
The tempting shortcut is for the app to ask Stripe directly: look up the customer, check the subscription, allow the launch. Do not ship this.
- It requires a secret key inside every copy of your app. Anyone can extract it, and it can read customer data and, depending on the key, make charges.
- It makes your launch depend on Stripe’s API rate limits and availability.
- It sends the customer’s email or Stripe id from the app, which most buyers never agreed to.
The correct shape is a small server of your own, or a licensing service, that holds the Stripe credentials and answers the app with a yes or no. Should you build your own license server lists what that server must do.
Why Checkout Session ids make bad keys
Using the Session id as the key is the cheapest fix, and the one that fails in the most ways.
- The id appears in the success URL (
?session_id=cs_...), so it ends up in browser history and server logs. - It is not tied to a seat count. One Session id covers every seat in the order, so you cannot hand out or revoke seats separately.
- Revoking means deleting the record that proves the sale.
- You cannot choose its length, alphabet or format, and a buyer will not type a long machine-generated id from a screenshot.
A random key of your own, 25 characters in Crockford base32, carries 125 bits and is easy to read aloud. The point of a separate key is that it can be revoked, replaced and counted without touching the payment record.
What Stripe Managed Payments adds and leaves out
Managed Payments is Stripe’s merchant of record product. Stripe’s documentation says it covers sales tax, VAT and GST in more than 80 countries, fraud prevention, dispute management and transaction-level support. It does not change the fulfilment picture. Lemon Squeezy’s migration documentation states: “Managed Payments doesn’t deliver files, license keys, or download links. You’ll need a separate solution.” Lemon Squeezy is closing on 31 March 2027 and recommends Managed Payments to its sellers, so this gap will meet many sellers at once.
Stripe Apps do not fill it either. Stripe describes them as a way to extend Stripe with third-party services or custom user interfaces. An app can connect a third-party service to your account. It is not itself a key generator.
Your three real options
- Build the key layer. A webhook handler, a key generator, a table of licenses and activations, a validation endpoint with rate limits, an email, and a way to sign answers. Reasonable for a single product with simple rules.
- Use a licensing service that reads your Stripe account. You keep Stripe as the payment system and rent the key layer.
- Leave Stripe for a platform with keys built in. Polar and Dodo Payments both list license keys as a feature next to payment. You give up Stripe as the payment processor and pay the platform’s rate on every sale.
How to add license keys to Stripe walks through the flow for options 1 and 2.
Doing this with Clavem
Clavem is option 2. It issues a key when a Stripe Checkout Session is paid, counts devices, answers activate, validate and deactivate from your app with no secret, and returns an Ed25519-signed token your app can verify offline. It also hosts the download and sends the buyer an order page. You keep your Stripe account, and Clavem takes no cut of sales.
Clavem does not replace Stripe Entitlements if you use them, and it is not a merchant of record. A free plan covers 50 active licenses. See pricing and the Stripe connection guide.
Questions
Does Stripe Managed Payments include license keys?
No. Lemon Squeezy's migration documentation says Managed Payments does not deliver files, license keys or download links, and that you need a separate solution for them.
Can I use a Stripe Checkout Session id or Customer id as the license key?
You can, but you should not. Those ids appear in URLs, receipts, support tickets and logs, you cannot revoke one without breaking the record it names, and they do not carry a device limit. Generate a separate random key.
What are Stripe Entitlements for?
Entitlements map product features, such as API access or extended data retention, to Stripe Products. Stripe then tells you when to provision or remove a customer's access. They are server-side feature flags tied to subscriptions, not keys that a desktop app can verify.
Sources
- Lemon Squeezy migration documentation, Managed Payments comparison (as of November 2026)
- Stripe docs, Entitlements (as of November 2026)
- Stripe API reference, list active entitlements (as of November 2026)
- Stripe docs, best practices for API keys (as of November 2026)
- Stripe docs, Stripe Apps (as of November 2026)
- Stripe docs, fulfil orders after Checkout (as of November 2026)
- Stripe docs, how Managed Payments works (as of November 2026)
- Polar docs, license keys benefit (as of November 2026)
- Dodo Payments pricing page, feature list (as of November 2026)