> ## Documentation Index
> Fetch the complete documentation index at: https://polar.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from Lemon Squeezy

> Move your Lemon Squeezy subscriptions, customers, license keys and files to Polar before March 31, 2027.

Lemon Squeezy is [winding down payment processing on March 31, 2027](https://www.lemonsqueezy.com/blog/saying-goodbye-to-lemon-squeezy). Polar moves your subscriptions, customers, license keys and files, and most customers don't need to enter their card again (see [Payment methods that can't move](#payment-methods-that-cant-move)). If your app checks license keys, you need to ship one small update before you switch any subscription.

## Coding assistant prompt

Optional. If you use a coding assistant that can inspect your repository, paste this prompt into it. It points the assistant at the `polar-migration` skill and asks for a migration plan before any code changes, including the license key update below. Review that plan before asking it to implement anything. Never paste Lemon Squeezy or Polar secrets into a conversation.

```text Prompt theme={null}
Help me migrate this application from Lemon Squeezy to Polar.

Follow Polar's `polar-migration` skill. If it is not loaded in this session, read it here first, together with the migration plan it links to:
https://raw.githubusercontent.com/polarsource/agent-toolkit/main/skills/polar-migration/SKILL.md
https://raw.githubusercontent.com/polarsource/agent-toolkit/main/skills/polar-migration/references/migration-plan.md

Also read https://polar.sh/docs/migrate-lemon-squeezy. Follow the skill and the guide over what you remember about Polar or Lemon Squeezy.

Start with the migration plan. Do not change code, create resources, cancel subscriptions or start a switch until I have reviewed and approved it. Never ask me to paste Lemon Squeezy or Polar secrets into this chat.
```

## Migration steps

Steps 4 and 5 happen in your app. The others happen in Polar under **Settings → Migrations**, where step 6 guides you through requesting the card copy in Lemon Squeezy.

1. **Connect your Lemon Squeezy store** with an API key.
2. **Assess and import your catalog.** Polar checks what can move, then imports your products, discounts and customers. Billing stays on Lemon Squeezy.
3. **Set up benefits.** Polar brings over your license keys, files and links. See [Benefits and license keys](#benefits-and-license-keys).
4. **Update your app.** If your app checks license keys, ship the update in [Update your app before you switch](#update-your-app-before-you-switch).
5. **Move new sales to Polar.** Sell the imported products on Polar, so new customers get the same products and benefits as your existing subscribers. Existing subscriptions keep renewing on Lemon Squeezy until you switch them.
6. **Move saved cards.** Request the copy in Lemon Squeezy, with Polar as the destination. Lemon Squeezy copies your customers and their saved cards to Polar, and usually starts within a week.
7. **Switch billing to Polar.** For each subscription you select, Polar cancels it on Lemon Squeezy and bills the next renewal on Polar.

> [!WARNING]
>
> Switching can't be undone. Before you switch any subscription:
>
> * **Ship the app update.** Once a subscription switches, its license key is on Polar, and an app that only asks Lemon Squeezy can't rely on it.
> * **Turn off Lemon Squeezy's cancellation emails.** Lemon Squeezy sees the switch as a cancellation. If your store emails customers when a subscription is cancelled, every customer you switch gets one. Turn that email off in your Lemon Squeezy store's email settings.
> * **Check your Lemon Squeezy webhooks.** Lemon Squeezy sends `subscription_cancelled`, and later `subscription_expired`. Make sure your handlers don't remove access or start churn emails for subscriptions that switched.

When you switch, a subscription that renews within 24 hours stays on Lemon Squeezy, so it isn't charged twice. Polar marks it as skipped and doesn't retry it on its own: once that renewal has gone through, start the switch again for it. A subscription already cancelled on Lemon Squeezy still switches, and Polar ends it on the same date instead of renewing it.

Polar doesn't send customers a separate email about the switch. The first renewal reminder and the first receipt from Polar include a short note that their billing moved to Polar.

## Payment methods that can't move

Some saved payment methods can't be carried over from Lemon Squeezy:

* **PayPal**
* **India-issued cards:** the card moves, but the approval India requires for recurring charges doesn't.
* **Cash App Pay and Link**

These subscriptions still switch. If Polar has another copied card for the customer, it uses that one. Otherwise their first renewal on Polar fails, and Polar asks the customer to enter their payment details again. Once they do, the subscription keeps renewing on Polar as usual. To avoid the failed payment, ask these customers to update their payment method in the customer portal after the switch.

## Benefits and license keys

Polar reads what each of your products gives buyers and sets it up as [benefits](https://polar.sh/docs/features/benefits/introduction.md) on the imported products. You pick which ones to bring over, and you can edit them later from **Benefits**.

| On Lemon Squeezy | On Polar |
| - | - |
| License keys | [License key benefit](https://polar.sh/docs/features/benefits/license-keys.md), with the same activation limit. Customers keep their key, its expiry date and their activated devices. |
| Files | [File downloads benefit](https://polar.sh/docs/features/benefits/file-downloads.md), with the files copied to Polar |
| Links | [Custom benefit](https://polar.sh/docs/features/benefits/custom.md), with the links in its note |

* **Subscribers** get the benefits when their subscription switches.
* **Past one-time buyers** get them as soon as you set up benefits. This covers paid and partly refunded orders. Polar doesn't email them: they find everything in the customer portal.

A few license keys don't move as they are:

* **Past buyers whose key is disabled or expired** on Lemon Squeezy get no key on Polar, only your files and links.
* **A customer who bought the same product more than once** keeps one key. Their other keys for that product stay on Lemon Squeezy only.
* **Usage and validation counts** start at zero.

## Update your app before you switch

For a while, some keys are on Polar and others are still on Lemon Squeezy. Ship an update that checks the key with Polar first, and asks Lemon Squeezy only when Polar doesn't have the key yet:

```ts theme={null}
// Polar knows these keys but no longer accepts them. Don't ask Lemon Squeezy.
const REJECTED_ON_POLAR = [
  "License key is no longer active.",
  "License key has expired.",
];

async function isLicenseValid(key: string) {
  const polar = await fetch(
    "https://api.polar.sh/v1/customer-portal/license-keys/validate",
    {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ key, organization_id: POLAR_ORGANIZATION_ID }),
    },
  );
  if (polar.status === 200) return true;
  if (polar.status !== 404) {
    throw new Error("Polar is unavailable"); // Handle it as you do today.
  }
  const { detail } = await polar.json();
  if (REJECTED_ON_POLAR.includes(detail)) return false;

  // Polar doesn't have this key yet: use your current Lemon Squeezy check.
  return isLicenseValidOnLemonSqueezy(key); // Your existing function.
}
```

| Polar answers | Your app |
| - | - |
| `200` | Valid. |
| `404` with `License key is no longer active.` or `License key has expired.` | Invalid. Don't ask Lemon Squeezy: after a refund on Polar, the key often still works there. |
| `404` with `Not found` | The key isn't on Polar yet, for example a subscriber who hasn't switched. Ask Lemon Squeezy. |
| Anything else, or no answer | Polar is unavailable. Handle it as an outage, not as an invalid key. |

Once a key is on Polar, only Polar's answer counts: changes to the key on Lemon Squeezy don't affect it. Remove the Lemon Squeezy check once every subscription has switched and Lemon Squeezy has stopped processing payments.

If your app limits devices, see [Devices and activations](#devices-and-activations) below.

## Migration details

> [accordion] Devices and activations
>
> Activated devices stay activated. Polar keeps each Lemon Squeezy activation under the same ID, so the `instance_id` your app saved works as the `activation_id` in Polar's [validate](https://polar.sh/docs/features/benefits/validate-license-keys.md#validate-a-key) and [deactivate](https://polar.sh/docs/features/benefits/validate-license-keys.md#deactivate-a-device) endpoints. Devices count toward the key's activation limit, as they did on Lemon Squeezy.
>
> * **Devices activated on Lemon Squeezy after the key moved** aren't on Polar. [Activate them on Polar](https://polar.sh/docs/features/benefits/validate-license-keys.md#activate-a-device) once. The same goes for the rare activation whose ID isn't a standard UUID.
> * **Keys with unlimited activations** have no device limit on Polar. Their existing devices keep working, but Polar doesn't activate new ones: validate these keys without a device ID.
> * **A key moves** when you set up benefits for past buyers, and when the subscription switches for subscribers.

> [accordion] A license key that's already on Polar
>
> License keys are unique within a Polar organization. In the rare case that a Lemon Squeezy key has the same value as a key already in your Polar organization, that customer gets a new key instead. Their old key doesn't work on Polar, so they need the new one from the customer portal.

> [accordion] What you can sell
>
> Polar is built for software and digital products: SaaS, apps, plugins, templates, courses, premium content and similar. Some categories aren't supported, such as physical goods and human services, and others need a closer look before approval. Our [Acceptable Use Policy](https://polar.sh/docs/merchant-of-record/acceptable-use/introduction.md) explains what is and isn't allowed.

> [accordion] PayPal at checkout
>
> Lemon Squeezy offers PayPal at checkout, and Polar doesn't yet. It's on our radar, but we can't share a timeline. Polar supports cards, Apple Pay, Google Pay and a growing set of local payment methods. See [Payment Methods](https://polar.sh/docs/features/checkout/payment-methods.md).

> [accordion] Supported countries
>
> You can sign up as an individual or as a registered company. Check the list of [supported countries](https://polar.sh/docs/merchant-of-record/supported-countries.md) to see whether Polar pays out to your country and what you need to set up a payout account.

> [accordion] Fees
>
> The free Starter plan charges 5% + 50¢ per transaction. If you sell more, the Pro ($20/mo, 3.8% + 40¢), Growth ($100/mo, 3.6% + 35¢) and Scale (\$400/mo, 3.4% + 30¢) plans lower your rate in exchange for a monthly fee. You can switch plans at any time. Cards issued outside the US add 1.5%.
>
> Payouts go through Stripe with no markup from Polar: $2 per month with active payouts, 0.25% + $0.25 per payout, and between 0.25% and 1% for currency conversion depending on your country.
>
> The [pricing page](https://polar.sh/resources/pricing) has the full breakdown. See [Fees](https://polar.sh/docs/merchant-of-record/fees.md) for refunds, disputes and payouts.

> [accordion] Trying Polar first
>
> Create an account in our [sandbox environment](https://polar.sh/docs/integrate/sandbox.md) to try Polar without moving real money. When you're ready, [sign up for Polar](https://polar.sh/signup) and go through onboarding. For anything the migration doesn't cover, connect your coding assistant to Polar with the [Polar CLI](https://polar.sh/docs/integrate/cli/introduction.md) or our [MCP server](https://polar.sh/docs/integrate/mcp.md).

## Questions

If your question isn't answered here, [contact our support team](https://polar.sh/docs/support.md). Please include your current Lemon Squeezy setup (products, subscriptions and license keys) so we can help you faster.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.