If your shipped desktop app, plugin, or CLI validates purchases against Lemon Squeezy’s License API, moving off Lemon Squeezy before its 2027 shutdown requires keeping every existing customer’s key and active device instance working seamlessly. CopperPouch makes this a three-step process: export your keys, run a verified dry-run import, and swap a single base URL in your app.
Why Lemon Squeezy license keys need a dedicated plan
Apps using Lemon Squeezy call three unauthenticated endpoints on https://api.lemonsqueezy.com: POST /v1/licenses/activate, POST /v1/licenses/validate, and POST /v1/licenses/deactivate. Stripe Managed Payments does not offer a license key server, so any app still pointing at Lemon Squeezy after the shutdown risks locking out paying users.
Step 1: Export keys and activations
Use CopperPouch’s export script to pull every license key, active device instance, and order-item mapping from the Lemon Squeezy API into a locked-down JSON file (permissions 0600, never logging your API key):
LEMON_SQUEEZY_API_KEY=... pnpm tsx scripts/export-lemon-squeezy-licenses.ts --out licences.json --store-id 123
Omit --store-id to export every store on your Lemon Squeezy account. For manual curl exports, see our Lemon Squeezy data export guide.
Step 2: Dry-run and commit the import
Create your software product and license policy in CopperPouch, then map each Lemon Squeezy product (or specific variant) to the matching CopperPouch product and policy. Each import request accepts up to 500 keys and is safely idempotent:
- Dry run: Call
POST /v1/licensing/imports/lemon-squeezywithdry_run: true. Nothing is written; CopperPouch returns a row-by-row validation report (valid,duplicate,invalid, orunmapped) and a cryptographicrequest_digest. - Approve: Request an
import_licensesapproval bound to that exactrequest_digest. - Commit: Resubmit with
dry_run: false, the approval token, and anIdempotency-Key. Every key and its active device instances commit atomically in one transaction. Re-running later skips already-imported keys cleanly.
Every existing Lemon Squeezy activation instance keeps its original instance_id and name, disabled keys import as suspended, expired keys stay expired, and activation_limit carries over as your device limit.
Step 3: Swap one base URL in your app
Point your client at CopperPouch’s compatible endpoint—no payload or response-parser rewrite required:
// Before
const LICENSE_API = 'https://api.lemonsqueezy.com';
// After
const LICENSE_API = 'https://api.copperpouch.com/compat/lemon-squeezy';
async function validate(licenseKey: string, instanceId: string) {
const response = await fetch(LICENSE_API + '/v1/licenses/validate', {
method: 'POST',
headers: { Accept: 'application/json' },
body: new URLSearchParams({ license_key: licenseKey, instance_id: instanceId }),
});
return response.json();
}
The compatible endpoints accept both form-encoded and JSON bodies, match Lemon Squeezy’s exact JSON response shapes and HTTP error codes (400 for business rules like activation limits, 404 for unknown keys, 422 for missing fields), and enforce 60 requests/minute per IP. Cache validation responses locally rather than hammering the endpoint on every launch.
Upgrading new sales to signed offline leases
While the compatible endpoint keeps legacy apps working smoothly (and can optionally accept newly issued native keys when allow_key_only_activation is enabled on a policy), new CopperPouch builds can adopt our TypeScript SDK for even stronger security: Ed25519 proof-of-possession device keys and verifiable offline leases up to 30 days. Read our software licensing overview or the developer migration guide.