How to Migrate from Lemon Squeezy to Stripe Without Losing Your Licence Keys
A step-by-step plan for moving products, orders, licence keys, activations and files to Stripe, updating your app and cutting over without stranding customers.
A Lemon Squeezy migration has a deadline of March 31, 2027 and a trap: you can copy every licence key perfectly and still break your app on the first launch after the switch. Keys are one part. The records around them and the service that checks them matter just as much.
This guide follows the order we would work in. If you have not read what was announced, start with what software sellers need to know.
First, decide which kind of Stripe you are moving to
"Moving to Stripe" can mean two different setups.
| Stripe in your own account | Stripe Managed Payments | |
|---|---|---|
| Merchant of record | Your business | Stripe |
| Sales tax, VAT, GST | Your responsibility | Handled by Stripe in supported countries |
| Checkout options | Checkout, Payment Links, Elements and more | Checkout and Payment Links |
| Availability | Standard Stripe account | Eligible businesses and digital products only |
| Licence keys and downloads | Not included | Not included |
The last row is the one to remember. Neither option replaces licence or file delivery. Lemon Squeezy states that Managed Payments does not deliver files, links or licence keys.
If you are eligible and choose Managed Payments, Lemon Squeezy's migration guide describes four stages: set up, test, go live and migrate subscriptions.
1. Prepare product and customer records
Make one row per variant, not per product. Variants hold the licence settings, files and links. For each, note:
- Lemon Squeezy product and variant IDs
- Price and currency
- Whether it issues licence keys
- Activation limit, including unlimited
- Licence length, or lifetime
- Files and links delivered
- Whether any subscription still renews against it
For customers, keep the Lemon Squeezy customer ID next to the email address. If you use the Managed Payments toolkit, its customer step creates Stripe records and a mapping report. It does not match customers you already have in Stripe, so look for duplicates and keep both IDs in separate fields.
2. Export historical orders
Use the Export button on the Orders page. Lemon Squeezy emails the CSV file to the store owner. For keys, activations, subscriptions, order items and files, use the API.
Check the export before you rely on it:
- Order count matches the dashboard for the same period.
- Refunded and partly refunded orders are marked.
- Each licence key links to an order, a variant and a customer.
- Amounts keep their currency. Do not convert them.
Run the export again just before cutover so late sales are not missed.
3. Preserve original licence keys
Copy each key exactly as issued, including letter case, along with its status, expiry and activation limit. Lemon Squeezy's guidance for a self-built replacement is to keep original key values, activation limits and activation IDs, so existing keys keep working.
A few practical rules:
- Never reissue keys as part of the move. A new key means every customer has to act.
- Match keys without regard to case if that is how your customers have been typing them, but store the original.
- Carry over disabled and expired states. An import that marks everything active quietly gives away access.
- Protect keys at rest. Encrypt them, and keep full keys out of logs and URLs.
4. Preserve activation limits and identifiers
An activation is a license key instance in Lemon Squeezy. Each has a unique identifier, returned to your app when it activates. Your app usually saves it and sends it back as instance_id when it validates.
If the new service does not know those identifiers, two bad things can happen. Validation fails for a legitimate user, or the device activates again and uses up another seat. Import instances with their identifiers, then check that each key's used seat count equals the number of instances you imported.
Reconcile before you trust the import
Pick a handful of real cases and follow each one from the export to the new system: a key with free seats, a key that is full, a lifetime licence, an expired one, a refunded order and a customer who bought twice. For every case, write down what the old system says and what the new one says. Any difference is either a bug or a policy decision you have not made yet.
Compare totals as well: orders, customers, keys, instances and files. Matching totals do not prove the data is right, but a mismatch proves it is not.
5. Back up your digital files
Download every file customers are entitled to, including old versions you still promise. Record for each:
| Field | Why |
|---|---|
| Variant | Who may download it |
| Version | Which build a buyer received |
| Size in bytes | A quick completeness check |
| SHA-256 checksum | Proof the copy is identical |
On Windows, Get-FileHash .\installer.exe prints a SHA-256 checksum. On macOS, use shasum -a 256. Keep a second copy somewhere separate, and put production files in private storage, not a public folder.
Copy variant links by hand from the dashboard. Lemon Squeezy notes that its API does not return them.
6. Map products to Stripe
Each Lemon Squeezy variant needs a Stripe product or price your fulfilment can recognise. In the Managed Payments sandbox, Lemon Squeezy copies each variant to a separate Stripe product with its own price ID, and provides a product mapping report.
Keep a table with four columns: variant ID, Stripe product ID, live price ID and the access it grants. Sandbox and live IDs can differ, especially for products you create by hand in a sandbox, so verify the live column separately.
7. Update licence validation endpoints
Preserving a key's value does not make a new service compatible with Lemon Squeezy's API. The Lemon Squeezy License API has its own address, paths, form-encoded parameters such as license_key and instance_id, and response shape. A replacement either imitates all of that or your app changes.
You have two routes:
- Compatible replacement. If your own service matches the License API, the app may only need a new base URL. You still have to ship that change if the address is built into the app.
- A different API. You update the request and response handling. This is the case with KeyMelon.
KeyMelon's licence API takes JSON with the original key and an installation identifier:
const response = await fetch(base + '/api/v1/licences/validate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ key: licenceKey, deviceId: savedInstanceId })
})
const result = await response.json()
if (!response.ok) handleLicenceError(result.error.code)
Here savedInstanceId is the identifier your app already stored, which only works if it was imported.
Whichever route you take:
- Put the validation address behind a domain you control, so the next move needs no app update.
- Decide what the app does if the licence server cannot be reached. A short grace period is kinder than locking people out.
- Ship the update early. Installed copies that never update will keep calling the old address.
8. Test checkout and fulfilment in a sandbox
Use test keys and Stripe's test payment methods. Do not test with real cards or live payments.
- A purchase creates exactly one licence and one email.
- The same webhook delivered twice changes nothing the second time.
- A delayed payment grants nothing until it succeeds.
- A full refund follows your access policy. A partial refund does what you intend.
- An imported key validates with its imported identifier.
- An imported key at its activation limit refuses one more device.
- An old buyer can sign in and download the right version.
Lemon Squeezy notes that subscriptions cannot be migrated in a sandbox, so test that handover with a sample event. For the payment side, see our guide to delivering digital products with Stripe.
9. Protect existing customer access
Until you have verified the replacement, leave Lemon Squeezy running. Existing purchases remain accessible there until the deadline, and subscriptions that have not moved should keep their current fulfilment and webhooks.
Give every record a single source of truth. A simple field such as source: lemonsqueezy or source: stripe prevents an old webhook from overwriting a migrated subscription.
10. Plan the production cutover
- Finish the import and reconcile counts.
- Deploy fulfilment and connect live webhook endpoints with signature verification.
- Release the app update.
- Pick a quiet period.
- Switch checkout links and server-created sessions to live Stripe prices.
- Make one small real purchase yourself if your policy allows, then refund it.
- Run a final export and import any orders made during the switch.
- Watch failed webhooks and licence errors for several days.
Write down how to go back: which links to restore and which records to reconcile. Rolling back gets harder with every new sale.
11. Tell your customers
Say what changes, what stays and what they must do. A short version:
We are changing how we sell and deliver our software. Your licence key stays the same. Please update to version 4.2 or later before March 31, 2027. Your downloads will be available in our new customer portal. If you pay for a subscription, we will contact you separately.
Adjust it to what is actually true for you. If subscribers use PayPal, they will need to start again with a supported method before moving to Managed Payments. Managed Payments customers will see a different name on statements and manage orders through Link.
KeyMelon's migration programme and its limits
KeyMelon is in early access and runs against Stripe test payments today. Its migration workflow imports products, orders, original keys, activation limits, instance identifiers and files, with a dry run before anything is written. See how the migration works.
The initial programme excludes sellers with active recurring product subscriptions. It covers one-time purchases, lifetime licences, fixed-duration licences and eligible historical purchases. KeyMelon uses its own licence API, so your app needs an update, and compatibility with Stripe Managed Payments has not been verified.
Sources
- Lemon Squeezy: Migration overview and key dates
- Lemon Squeezy: Digital fulfillment when moving to Managed Payments
- Lemon Squeezy: Migration guide
- Lemon Squeezy: Test your setup in the sandbox
- Lemon Squeezy: Go live
- Lemon Squeezy: Wind-down FAQs
- Lemon Squeezy: Exporting orders
- Lemon Squeezy: License API
- Lemon Squeezy: Validate a license key
- Lemon Squeezy: The license key instance object
- Stripe: Fulfill orders
- Stripe: Managed Payments
Checked December 2, 2026. Providers change their documentation, so confirm anything time sensitive at the source. KeyMelon is independent and is not affiliated with or endorsed by Lemon Squeezy or Stripe.