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

# Migrate to Dodo Payments

> Move your products, customers, discount codes, and license keys from Lemon Squeezy, Stripe, Polar.sh, or Paddle to Dodo Payments.

Dodo Migrate is a CLI tool that moves your data from Lemon Squeezy, Stripe, Polar.sh, or Paddle to Dodo Payments. It prompts you for each choice and can migrate into test mode first, so you can check the result before you move live data.

## What You Can Migrate

<CardGroup cols={2}>
  <Card title="Products & Pricing" icon="box">
    Products and their prices.
  </Card>

  <Card title="Customers" icon="users">
    Customer records, including contact details.
  </Card>

  <Card title="Discount Codes" icon="tag">
    Discount codes and coupons.
  </Card>

  <Card title="License Keys" icon="key">
    License keys with customer and product mappings (Polar.sh and Lemon Squeezy only).
  </Card>
</CardGroup>

The tool doesn't migrate subscriptions, payment history, or saved payment methods. Plan how your existing subscribers move to Dodo Payments before you switch. See [Subscription Migration](/miscellaneous/subscription-migration).

## Install the Tool

```bash theme={null}
npm install -g dodo-migrate
```

You'll need Node.js 18 or later.

## Run a Migration

Choose the command for your current provider:

<Tabs>
  <Tab title="Lemon Squeezy">
    ```bash theme={null}
    dodo-migrate lemonsqueezy
    ```
  </Tab>

  <Tab title="Stripe">
    ```bash theme={null}
    dodo-migrate stripe
    ```
  </Tab>

  <Tab title="Polar.sh">
    ```bash theme={null}
    dodo-migrate polar
    ```
  </Tab>

  <Tab title="Paddle">
    ```bash theme={null}
    dodo-migrate paddle
    ```
  </Tab>
</Tabs>

The tool prompts you for:

* Your provider's API key
* Your Dodo Payments API key
* Whether to test first or go live
* Which Dodo Payments brand to migrate to
* Which data to migrate (products, customers, discounts, license keys)

## Non-Interactive Mode

To skip the prompts, pass values as flags. `--mode` takes `test_mode` or `live_mode`. Use a Dodo Payments API key created in the same mode. If you omit `--dodo-brand-id`, the tool lists your brands and asks you to pick one.

The flag that selects what to migrate is `--types` for Lemon Squeezy and `--migrate-types` for the other providers. If you omit it, the tool asks you to choose. When no terminal is attached, Paddle migrates only products and Polar.sh migrates products and discounts.

<Tabs>
  <Tab title="Lemon Squeezy">
    ```bash theme={null}
    dodo-migrate lemonsqueezy \
      --provider-api-key=lsq_XXXXXXXXXXXXXXXX \
      --dodo-api-key=YOUR_DODO_API_KEY \
      --mode=test_mode \
      --dodo-brand-id=YOUR_BRAND_ID \
      --types=products,coupons,customers,license_keys
    ```
  </Tab>

  <Tab title="Stripe">
    ```bash theme={null}
    dodo-migrate stripe \
      --provider-api-key=sk_test_XXXXXXXXXXXXXXXX \
      --dodo-api-key=YOUR_DODO_API_KEY \
      --mode=test_mode \
      --dodo-brand-id=YOUR_BRAND_ID \
      --migrate-types=products,coupons
    ```
  </Tab>

  <Tab title="Polar.sh">
    ```bash theme={null}
    dodo-migrate polar \
      --provider-api-key=polar_org_XXXXXXXXXXXXXXXX \
      --dodo-api-key=YOUR_DODO_API_KEY \
      --mode=test_mode \
      --dodo-brand-id=YOUR_BRAND_ID \
      --migrate-types=products,discounts,customers,license_keys
    ```
  </Tab>

  <Tab title="Paddle">
    ```bash theme={null}
    dodo-migrate paddle \
      --provider-api-key=paddle_XXXXXXXXXXXXXXXX \
      --dodo-api-key=YOUR_DODO_API_KEY \
      --mode=test_mode \
      --dodo-brand-id=YOUR_BRAND_ID
    ```
  </Tab>
</Tabs>

## License Key Migration

License keys can be migrated from Polar.sh and Lemon Squeezy. When you select license keys in the interactive prompt, or pass `license_keys` in `--types` (Lemon Squeezy) or `--migrate-types` (Polar.sh), the tool imports your existing keys with the correct customer and product associations.

<Warning>
  License key migration requires products and customers to be migrated in the same session. The tool builds an in-memory mapping of provider IDs to Dodo IDs during the run. If products or customers are missing, license keys cannot be linked correctly.
</Warning>

### What Migrates

* License key strings
* Activation limits
* Expiration dates
* Customer and product associations

### What Doesn't Migrate

* **License key activations** — customers must re-activate on their devices after migration.
* **Revoked or disabled keys** — only active keys are migrated.
* Keys without a matching product or customer are skipped with a warning.

<Tip>
  If you re-run the migration, already-imported keys are detected and skipped, so it's safe to retry.
</Tip>

## Get Help

* **Tool help**: `dodo-migrate --help`
* **Provider-specific help**: `dodo-migrate lemonsqueezy --help` (or `stripe`, `polar`, `paddle`)
* **Community**: [Discord](https://discord.gg/bYqAp4ayYh)
* **Report issues**: [GitHub](https://github.com/dodopayments/dodo-migrate)

## Update or Uninstall

```bash theme={null}
# Update to the latest version
npm update -g dodo-migrate

# Remove the tool
npm uninstall -g dodo-migrate
```


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