Own your license keys and digital file delivery.

Migrating off Lemon Squeezy ahead of the March 31, 2027 transition to Stripe Managed Payments? Deploy a minimal, self-hosted Cloudflare Worker + R2 + Ed25519 license API inside your own infrastructure — compatible with legacy license-key payloads and paired cleanly with Stripe, Paddle, or Polar.

src/license.ts — swap base URL to your own Worker domain RFC 8032 Ed25519 + KV Aliases
- const ENDPOINT = "https://api.lemonsqueezy.com/v1/licenses/validate";+ const ENDPOINT = "https://licenses.your-app.com/v1/licenses/validate";
const res = await fetch(ENDPOINT, {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: new URLSearchParams({ license_key, instance_id }), // Legacy UUID aliases supported
});
// Returns { valid, error, license_key, instance, meta } + offline-verifiable Ed25519 token

Local CSV Export Auditor (Browser-Only)

Inspect which active subscriptions in your Lemon Squeezy subscriptions.csv export use PayPal or sit outside Stripe Managed Payments’ 37 supported countries. Processing runs strictly inside your browser tab — zero CSV rows ever leave your machine.

Active MRR
—
Upload a CSV or click Load Example
PayPal Subscriptions
—
Requires card re-enrollment
Outside 37 Countries
—
Route via Polar, Paddle, or Checkout
Total Needing Action
—
Deduplicated subscriber count
No file loaded yet. Select your local subscriptions.csv above (nothing is uploaded) or click "Load Example CSV" to preview the deduplicated PayPal and country audit.

What a Payment Processor Handles vs. What You Self-Host

Core billing processors handle cards, subscriptions, and global tax — while this source kit restores the indie product primitives (license validation, expiring file downloads, and affiliate webhooks) inside your own Cloudflare account with zero third-party runtime dependency.

Capability Core Billing Processor Only With Self-Hosted Source Kit
License Key Validation API
/v1/licenses/activate|validate|deactivate
Not bundled (requires custom service) Schema-compatible endpoints + legacy UUID alias map in Cloudflare KV
Offline / Air-Gapped License Check Requires online API call RFC 8032 Ed25519 signed tokens verifiable locally via WebCrypto or native crypto
Expiring Digital File Delivery No built-in download gating HMAC-SHA256 time-limited links + per-order download caps backed by Cloudflare R2
Affiliate Attribution & Clawbacks Requires separate SaaS tool Signed 60-day first-party cookie + constant-time webhook check + automatic refund reversal
PayPal & International Subscriber Audit Manual spreadsheet filtering Zero-dependency Python CLI audit script + exportable subscriber segmentation

Auditable Source Code & Security Posture

You never hand us production API keys, customer emails, or license databases. You receive the full TypeScript Worker, Python 3 migration CLI, and automated unit + E2E test suites to inspect, audit, and deploy directly on your own Cloudflare account.

POST /v1/licenses/activate · validate

Legacy-Compatible License Engine

Accepts both x-www-form-urlencoded and JSON payloads, enforces per-key activation limits in Cloudflare KV, and resolves both existing legacy UUIDs and newly minted keys without forcing desktop users to re-activate.

POST /v1/downloads/sign · GET /file

Signed R2 File Delivery

Generates short-lived HMAC-SHA256 signed download URLs with strict expiration TTL and download-count ceilings so installers and digital assets stay private inside your own R2 bucket.

/v1/affiliates/track · /webhooks/stripe

Idempotent Webhook & Affiliate Ledger

Verifies webhook signatures in constant time, tracks integer-cent referral payouts idempotently across retries, and reverses affiliate balances automatically on charge.refunded or disputes.

One-Time Source Ownership — 30-Day Unconditional Refund

Buy the complete TypeScript Worker + Python CSV Migrator once for $99 and run it on your own Cloudflare Free/$5 account across unlimited products. Need zero-ops hosting or hands-on deployment? Optional add-ons are available below.

Optional · Managed Edge Hosting
$29/mo

For teams preferring managed ops · Cancel anytime

  • Hosted Cloudflare Edge endpoint on your custom domain
  • 100,000 monthly license checks & signed download tokens
  • Includes the complete local CSV migration toolkit
  • Export your KV/R2 state to self-host at any time (zero lock-in)
Start Managed Hosting ($29/mo)

Need hands-on deployment? Fixed-fee assisted migration ($499, includes the Self-Host Source Kit plus live Cloudflare setup & webhook verification inside your account) is available via direct booking.

Technical FAQ

Do my existing desktop or SaaS users have to re-enter their Lemon Squeezy license key?

No. KeySwitch seeds Cloudflare KV with an alias mapping from every legacy Lemon Squeezy UUID key to its new Ed25519-backed record. Swap the API base URL in your app or proxy and existing installs validate without interruption.

Why do PayPal subscriptions break during the Lemon Squeezy to Stripe Managed Payments migration?

PayPal billing agreements owned by Lemon Squeezy cannot be silently transferred into Stripe Managed Payments. Any active PayPal subscriber who does not move to a card before March 31, 2027 silently churns. Our migrator flags every affected subscriber and outputs a ready-to-send 3-touch winback campaign.

What happens to customers outside the 37 supported Stripe Managed Payments countries?

KeySwitch parses customers.csv and subscriptions.csv against the 37 supported country codes and exports a clean non_37_customers.csv list with exact MRR at risk so you can route those renewals through Polar.sh, Paddle, or direct Stripe Checkout without losing international revenue.

What does the $99 Self-Host Kit actually run on?

A single zero-dependency TypeScript Cloudflare Worker using Cloudflare KV + R2 (fits inside Cloudflare's free / $5 plan even at tens of thousands of daily license checks) plus a zero-dependency Python 3 migrator with pure RFC 8032 Ed25519 signing.

Does KeySwitch work with Paddle or Polar.sh instead of Stripe?

Yes. The License Key API (/v1/licenses/*), Signed Download API (/v1/downloads/sign), and Affiliate Tracker (/v1/affiliates/track) are payment-processor agnostic, with native Stripe webhook verification included out of the box.