> ## 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

> Easily migrate your data from other payment providers to Dodo Payments using our CLI tool

**Switching from another payment provider to Dodo Payments?** Our migration tool makes it easy to move your **products, customers, discount codes, and license keys without losing any data.** The process is safe, guided, and can be done in just a few minutes.

We currently support migrations from **Lemon Squeezy, Stripe, Polar.sh, and Paddle**.

### Supported Migrations

<CardGroup cols={2}>
  <Card title="Products & Pricing" icon="box">
    Migrate all your products and pricing details.
  </Card>

  <Card title="Customer Data" icon="users">
    Transfer your complete customer database, including contact details.
  </Card>

  <Card title="Discount Codes & Promotions" icon="tag">
    Move all discount codes and promotional offers seamlessly.
  </Card>

  <Card title="License Keys" icon="key">
    Import license keys with customer and product mappings. Supported for Polar.sh and Lemon Squeezy.
  </Card>
</CardGroup>

## Get Started

First, install the migration tool:

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

<Note>
  You'll need Node.js ≥ 18 installed on your computer.
</Note>

## Migrate Your Data

### If you're coming from Lemon Squeezy:

```bash theme={null}
dodo-migrate lemonsqueezy
```

### If you're coming from Stripe:

```bash theme={null}
dodo-migrate stripe
```

### If you're coming from Polar.sh:

```bash theme={null}
dodo-migrate polar
```

### If you're coming from Paddle:

```bash theme={null}
dodo-migrate paddle
```

The tool will walk you through everything step by step. You'll need:

* Your provider's API key (Lemon Squeezy, Stripe, Polar.sh, Paddle, etc.)
* Your Dodo Payments API key
* Whether you want to test first (recommended) or go live
* Which Dodo Payments brand to migrate to
* What data to migrate (products, customers, discounts, license keys)

## Why Use Our Migration Tool?

* **No data loss** - Everything transfers safely
* **Test first** - Try it in test mode before going live
* **Guided process** - We walk you through each step
* **Resume if needed** - If something goes wrong, you can pick up where you left off

## Advanced Usage

If you prefer to run the migration without prompts, you can provide all the details upfront:

### Lemon Squeezy migration:

```bash theme={null}
dodo-migrate lemonsqueezy \
  --provider-api-key=lsq_XXXXXXXXXXXXXXXX \
  --dodo-api-key=dp_XXXXXXXXXXXXXXXX \
  --mode=test_mode \
  --dodo-brand-id=brand_XXXXXX
```

### Stripe migration:

```bash theme={null}
dodo-migrate stripe \
  --provider-api-key=sk_test_XXXXXXXXXXXXXXXX \
  --dodo-api-key=dp_XXXXXXXXXXXXXXXX \
  --mode=test_mode \
  --dodo-brand-id=brand_XXXXXX \
  --migrate-types=products,coupons
```

### Polar.sh migration:

```bash theme={null}
dodo-migrate polar \
  --provider-api-key=polar_org_XXXXXXXXXXXXXXXX \
  --dodo-api-key=dp_XXXXXXXXXXXXXXXX \
  --mode=test_mode \
  --dodo-brand-id=brand_XXXXXX \
  --migrate-types=products,discounts,customers,license_keys
```

### Paddle migration:

```bash theme={null}
dodo-migrate paddle \
  --provider-api-key=paddle_XXXXXXXXXXXXXXXX \
  --dodo-api-key=dp_XXXXXXXXXXXXXXXX \
  --mode=test_mode \
  --dodo-brand-id=brand_XXXXXX
```

## License Key Migration

License key migration is supported for **Polar.sh** and **Lemon Squeezy**. When you select license keys in the interactive prompt (or pass `license_keys` in `--migrate-types`), the tool will import your existing license keys into Dodo Payments 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 gets migrated

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

### What doesn't migrate

* **License key activations** — customers will need to 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>
  Duplicate license keys are handled gracefully. If you re-run the migration, already-imported keys are detected and skipped, making the process safe to retry.
</Tip>

## Need Help?

* **Tool help**: `dodo-migrate --help`
* **Lemon Squeezy help**: `dodo-migrate lemonsqueezy --help`
* **Stripe help**: `dodo-migrate stripe --help`
* **Polar.sh help**: `dodo-migrate polar --help`
* **Paddle help**: `dodo-migrate paddle --help`
* **Community support**: [Discord](https://discord.gg/bYqAp4ayYh)
* **Report issues**: [GitHub](https://github.com/dodopayments/dodo-migrate)

## Update the Tool

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

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