--- title: Migrate subscriptions to Stripe Billing using toolkit subtitle: Learn how to migrate your existing subscriptions to Stripe using the toolkit. route: /billing/subscriptions/import-subscriptions-toolkit --- # Migrate subscriptions to Stripe Billing using toolkit Learn how to migrate your existing subscriptions to Stripe using the toolkit. Use the [Billing migration toolkit](https://dashboard.stripe.com/billing/migrations) to migrate your existing *subscriptions* from a third-party system, home-grown system, or an existing Stripe account to Stripe Billing. 1. If you haven’t already, review the [migration stages](https://docs.stripe.com/billing/subscriptions/migrate-subscriptions.md#migration-stages). 1. [Set up a Stripe Billing integration](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md) before you begin migration. This is a one-time setup that you don’t need to repeat for future migrations. 1. [Request a PAN data import](https://docs.stripe.com/get-started/data-migrations/pan-import.md) from your current processor. This step is only required if you’re migrating to Stripe from another processor. If you’re migrating from Stripe to Stripe, you can skip this prerequisite. 1. If you’re migrating from a third-party or home-grown system, carefully time the cancellation of your existing subscriptions and the creation of new ones in Stripe. To avoid missing a billing period, create the new subscriptions in Stripe first, before canceling the old subscriptions. To avoid double billing, cancel subscriptions in your old system before the subscriptions are set to charge. For subscriptions with upcoming billing dates close to migration, schedule them to start after the cycle so the final bill is in the old system. ## Open the Billing migration toolkit Create a *sandbox* in the Dashboard if you want to run a test migration first. 1. Navigate to [Dashboard](https://dashboard.stripe.com/billing) > [Subscriptions](https://dashboard.stripe.com/test/subscriptions) > [**Migrations**](https://dashboard.stripe.com/test/billing/migrations). Alternatively, you can click the overflow menu (⋯) next to **+ Create subscription**, and select [Migrate subscriptions](https://dashboard.stripe.com/settings/billing/migrations). 1. To start your migration, click **Let’s get started**. ## Download a CSV file First, export your existing subscriptions by matching the exported data to a migration-compatible CSV file. You can create your own CSV file, or download any of the following CSV templates provided by Stripe: * [Basic](https://docs.stripe.com/billing/subscriptions/import-subscriptions-toolkit.md#basic) * [Multi-price items](https://docs.stripe.com/billing/subscriptions/import-subscriptions-toolkit.md#multi-price) * [Ad-hoc pricing](https://docs.stripe.com/billing/subscriptions/import-subscriptions-toolkit.md#ad-hoc) You can also find examples of CSV files for common migration use cases in the [Toolkit CSV reference](https://docs.stripe.com/billing/subscriptions/toolkit-reference.md#migration-use-cases). 1. Click **Download CSV template**. 1. Choose a CSV template (basic, multi-price items, or ad-hoc pricing) based on your billing use case. ### Basic CSV This example shows a migration for common subscription use cases like quantity, taxes, billing anchor, discounts, trials, and backdating. ### Specify the following fields for a Basic CSV file: | Attribute | Type | Example | Description | | --------------------------- | ------------------------------ | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `customer` **(required)** | Stripe Customer ID | `cus_xxx1` | The identifier of the customer to create the subscription for. | | `start_date` **(required)** | Timestamp in epoch UNIX format | `1658179441` | Determines when to create the subscription. You must provide a value that’s 24 hours (or greater) into the future. In a sandbox, you can set this to 1 hour in the future. | | `price` **(required)** | Stripe Price ID | `price_1LDGNmDK0D4Fox2RxIaXQkBp` | You must use a recurring price. If migrating multiple items, use the `items.x.{price, quantity}` format instead. Ad-hoc prices are also supported with `adhoc_items.x.{amount, product, interval,currency}`. | | `quantity` | Number | `1` | Determines quantity of a subscription. By default, each subscription is for one product, but Stripe allows you to subscribe a customer to multiple quantities of an item. | | `metadata.*` | String | `subscription_1` | Attach these key-value pairs that you can attach to an object. This is useful for storing additional information about the object in a structured format. You can add any metadata fields you desire (for example, `metadata_third_party_sub_id`). If this is a Stripe-to-Stripe migration, enter `internal:Stripe`. | | `automatic_tax` | Boolean | `false` | Specify `true` to use automatic tax settings by Stripe Tax. | | `billing_cycle_anchor` | Timestamp in epoch UNIX format | `1658179441` | Determines the next date to bill the subscription to the customer. | | `coupon` | Stripe Coupon ID | `50_off` | The identifier of the coupon to apply to this subscription. | | `trial_end` | Timestamp in epoch UNIX format | `1658179441` | Sets the phase to trialing from the start date to the `trial_end` date. You must specify a value that’s before the cycle end date, and you can’t combine it with the trial. | | `proration_behavior` | Enum | `create_prorations` or `none` | Determines if the subscription creates prorations after migration. The default value is `create_prorations`. | | `collection_method` | Enum | `charge_automatically` or `send_invoice` | When charging automatically, Stripe attempts to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe emails your customer an invoice with payment instructions and mark the subscription as active. On creation, this defaults to `charge_automatically`. If `send_invoice`, you must set `days_until_due`. | | `default_tax_rate` | Stripe Tax ID | `txr_1LPcLzAWeZvbCyjpzDA4qs1l` | Sets the subscription’s `default_tax_rates`. This also determines the invoice’s `default_tax_rates` for any invoices issued by the subscription during this phase. This value is incompatible with `automatic_tax`. | | `backstart_start_date` | Timestamp | `1658179441` | Determines the `start_date` of the created subscription, which must occur in the past. If set, you must specify `none` for the `proration_behavior`. Doing so prevents the creation of a prorated invoice for the time between `backdate_start_date` and actual `start_date`. For more details, see [backdating no charge](https://docs.stripe.com/billing/subscriptions/backdating.md#backdating-no-charge). | | `days_until_due` | Integer | `30` | The number of days from when the invoice is created until it’s due. This value is required and valid only for invoices with `collection_method` set to `send_invoice`. | | `cancel_at_period_end` | Boolean | `false` | Specify `true` if you want to cancel a subscription at the end of the period. | ### Multi-price items CSV This example shows a migration that has multiple products per subscription. ### Specify the following fields for a Multi-price items CSV file: | Attribute | Type | Example | Description | | ------------------------------- | ------------------------------ | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `customer` **(required)** | Stripe Customer ID | `cus_xxx1` | The identifier of the customer to create the subscription for. | | `start_date` **(required)** | Timestamp in epoch UNIX format | `1658179441` | Determines when to create the subscription. You must provide a value that’s 24 hours (or greater) into the future. In a sandbox, you can set this to 1 hour in the future. | | `items.0.price` **(required)** | Stripe Price ID | `price_1LDGNmDK0D4Fox2RxIaXQkBp` | The identifier of the price object, which must be a recurring price. | | `items.0.quantity` | Number | `1` | Determines quantity of a subscription. By default, each subscription is for one product, but Stripe allows you to subscribe a customer to multiple quantities of an item. | | `items.1.price` **(required)** | Stripe Price ID | `price_1LujbnDCA5oQnOCew7kwa4T5` | The identifier of the price object, which must be a recurring price. | | `items.1.quantity` | Number | `1` | Determines quantity of a subscription. By default, each subscription is for one product, but Stripe allows you to subscribe a customer to multiple quantities of an item. | | `metadata_third_party_sub_id` | String | `subscription_1` | Attach these key-value pairs to an object. This is useful for storing additional information about the object in a structured format. | | `automatic_tax` | Boolean | `false` | Specify `true` to use automatic tax settings by Stripe Tax. | | `billing_cycle_anchor` | Timestamp in epoch UNIX format | `1658179441` | Determines the next date to bill the subscription to the customer. | | `coupon` | Stripe Coupon ID | `50_off` | The identifier of the coupon to apply to this subscription. | | `proration_behavior` | Enum | `create_prorations` | Determines if the subscription creates prorations after migration. The default value is `create_prorations`. | | `collection_method` | Enum | `charge_automatically` or `send_invoice` | When charging automatically, Stripe attempts to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. The default value is `charge_automatically`. When sending an invoice, Stripe emails your customer an invoice with payment instructions, and marks the subscription as active. If using `send_invoice`, you must set `days_until_due`. | | `default_tax_rate` | Stripe Tax ID | `txr_1LPcLzAWeZvbCyjpzDA4qs1l` | Sets the subscription’s `default_tax_rates`. This also determines the invoice’s `default_tax_rates` for any invoices issued by the subscription during this phase. This value is incompatible with `automatic_tax`. | | `backstart_start_date` | Timestamp | `1705753518` | Determines the `start_date` of the created subscription, which must occur in the past. If set, you must specify `none` for the `proration_behavior`. Doing so prevents the creation of a prorated invoice for the time between `backdate_start_date` and actual `start_date`. For more details, see [backdating no charge](https://docs.stripe.com/billing/subscriptions/backdating.md#backdating-no-charge). | | `days_until_due` | Integer | `30` | The number of days from when the invoice is created until it’s due. This is required and valid only for invoices with `collection_method` set to `send_invoice`. | | `cancel_at_period_end` | Boolean | `false` | Specify `true` if you want to cancel a subscription at the end of the period. | | `add_invoice_items.0.amount` | Integer | `100` | A positive integer in cents (or 0 for a free price). For more information about `add_invoice_items prices`, see [Invoice items](https://docs.stripe.com/api/invoiceitems.md). | | `add_invoice_items.0.product` | Stripe Product ID | `prod_PjfC3kWS58IoOX` | The identifier of the product to add the invoice to. | | `add_invoice_items.0.currency` | String | `usd` | A three-letter ISO currency code, in lowercase, for a [supported currency](https://docs.stripe.com/currencies.md). | ### Ad-hoc prices CSV This example shows handling a subscription migration using [ad-hoc pricing](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-items-price_data) for existing products. ### Specify the following fields for an Ad-hoc pricing CSV file: | Attribute | Type | Example | Description | | --------------------------------------- | ------------------------------ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `customer` **(required)** | Stripe Customer ID | `cus_xxx1` | The identifier of the customer to create the subscription for. | | `start_date` **(required)** | Timestamp in epoch UNIX format | `1710937191` | Determines when to create the subscription. You must provide a value that’s 24 hours (or greater) into the future. In a sandbox, you can set this to 1 hour in the future. | | `adhoc_items.0.amount` **(required)** | Integer | `100` | A positive integer in cents (or 0 for a free price). For more information, see [Create a subscription](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-items-price_data). | | `adhoc_items.0.product` **(required)** | Stripe Product ID | `prod_NwSGSFZb7ENuTW` | The identifier of the product that belongs with the ad-hoc price. | | `adhoc_items.0.interval` **(required)** | day, week, month or year | `month` | The billing frequency. | | `adhoc_items.0.currency` **(required)** | String | `usd` | A three-letter ISO currency code, in lowercase, for a [supported currency](https://docs.stripe.com/currencies.md). | | `adhoc_items.0.quantity` | Number | `1` | Determines quantity of a subscription. By default, each subscription is for one product, but Stripe allows you to subscribe a customer to multiple quantities of an item. | | `adhoc_items.1.amount` | Integer | `200` | A positive integer in cents (or 0 for a free price). For more information, see [Create a subscription](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-items-price_data). | | `adhoc_items.1.interval` | day, week, month or year | `month` | The billing frequency. | | `adhoc_items.1.currency` | String | `usd` | A three-letter ISO currency code, in lowercase, for a [supported currency](https://docs.stripe.com/currencies.md). | | `adhoc_items.1.quantity` | Number | `1` | Determines quantity of a subscription. By default, each subscription is for one product, but Stripe allows you to subscribe a customer to multiple quantities of an item. | | `metadata.source` | Number | `external:zuora` | Attach these key-value pairs to an object. This is useful for storing additional information about the object in a structured format. You can add any metadata fields desired, for example `metadata_third_party_sub_id`. If this is a Stripe-to-Stripe migration, enter `internal:Stripe`. | | `metadata_third_party_sub_id` | String | `subscription_1` | Attach these key-value pairs to an object. This is useful for storing additional information about the object in a structured format. | | `automatic_tax` | Boolean | `false` | Specify `true` to use automatic tax settings by Stripe Tax. | | `billing_cycle_anchor` | Timestamp in epoch UNIX format | `1713615591` | Determines the next date to bill the subscription to the customer. | | `coupon` | Stripe Coupon ID | `black_friday` | The identifier of the coupon to apply to this subscription. | | `proration_behavior` | Enum | `create_prorations` | Determines if the subscription creates prorations after migration. The default value is `create_prorations`. | | `collection_method` | Enum | `charge_automatically`or `send_invoice` | When charging automatically, Stripe attempts to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. The default value is `charge_automatically`. When sending an invoice, Stripe emails your customer an invoice with payment instructions, and marks the subscription as active. If using `send_invoice`, you must set `days_until_due`. | | `default_tax_rate` | Stripe Tax ID | `txr_1LPcLzAWeZvbCyjpzDA4qs1l` | Sets the subscription’s `default_tax_rates`. This also determines the invoice’s `default_tax_rates` for any invoices issued by the subscription during this Phase. This value is incompatible with `automatic_tax`. | | `backstart_start_date` | Timestamp in epoch UNIX format | `1705753518` | Determines the `start_date` of the created subscription, which must occur in the past. If set, you must specify `none` for the `proration_behavior`. Doing so prevents the creation of a prorated invoice for the time between `backdate_start_date` and actual `start_date`. For more details, see [backdating no charge](https://docs.stripe.com/billing/subscriptions/backdating.md#backdating-no-charge). | | `days_until_due` | Integer | `30` | The number of days from when the invoice is created until it’s due. This is required and valid only for invoices with `collection_method` set to `send_invoice`. | | `cancel_at_period_end` | Boolean | `false` | Specify `true` if you want to cancel a subscription at the end of the period. | | `add_invoice_items.0.amount` | Integer | `100` | A positive integer in cents (or 0 for a free price). For more information about `add_invoice_items prices`, see [Invoice items](https://docs.stripe.com/api/invoiceitems.md). | | `add_invoice_items.0.product` | Stripe Product ID | `prod_PjfC3kWS58IoOX` | The identifier of the product to add the invoice to. | | `add_invoice_items.0.currency` | String | `usd` | A three-letter ISO currency code, in lowercase, for a [supported currency](https://docs.stripe.com/currencies.md). | 1. In the CSV file, specify the details of the subscriptions you want to export. If you’re migrating subscriptions within Stripe accounts, refer to the [CSV example](https://docs.stripe.com/billing/subscriptions/toolkit-reference.md#within-Stripe-accounts) before you specify and upload a CSV file. ## Upload a CSV file Click **Upload CSV**. The CSV file size limit is 120 MB. Stripe validates the file to verify that the uploaded subscriptions are in the required CSV format. This process might take up to a few hours, depending on the size of the file. If the file is valid, you can proceed to the next step in the migration. ### Resolve validation errors If you have any errors in your uploaded file, the toolkit displays a failure summary. To resolve the errors: 1. Click **Download file to review errors**. 1. Review the `processing_error` column to see the errors. 1. Correct all the errors. Common errors include: | Error | Troubleshooting | | ---------------------------- | --------------------------------------------------------------------------------------------------- | | Invalid dates | Make sure all the dates are in epoch or Unix timestamp format. | | Incorrect `start_date` range | Make sure the `start_date` for each subscription is at least 24 hours in the future. | | Missing data | Make sure every record contains the required fields. | | Incompatible price and tax | Make sure prices for specified tax rates have the same `tax_behavior` (inclusive versus exclusive). | 1. Click **Upload revised file** to re-upload the corrected CSV (the CSV file size limit is 120 mb). 1. Wait for re-validation to see the latest validation status. ## Review uploaded subscriptions After Stripe validates your CSV file, review the summary of your uploaded subscriptions for any discrepancies: 1. Cross-check the summary for the correct: * Date of upload * Uploaded file name * Number of subscriptions * Number of customers * First subscription go-live date 1. If everything is valid, click **Start migration**. If you see errors, click **Cancel migration** and restart the migration from [Download a CSV file](https://docs.stripe.com/billing/subscriptions/import-subscriptions-toolkit.md#download-csv). ## Track migration progress After you review your uploaded subscriptions, track the progress of your migration: ### Migration in progress Your subscriptions are queued to schedule on the specified start date. This process can take a few minutes to a few hours, depending on the size of the file. For example, the validation and migration for 100,000 subscriptions takes approximately 30 minutes to complete. The Billing migration toolkit uses the [Subscription schedule](https://docs.stripe.com/api/subscription_schedules.md) to migrate your subscriptions. This allows your subscriptions to remain in a scheduled state for 24 hours before going live. In a sandbox, the buffer time is reduced to 1 hour for faster evaluation and testing. ### Scheduled subscriptions After migration, your subscriptions remain in a scheduled state for 24 hours before going live. You have 10 hours to [cancel these scheduled subscriptions](https://docs.stripe.com/billing/subscriptions/import-subscriptions-toolkit.md#cancel-migration) using the toolkit. Currently, you can’t update scheduled subscriptions using the toolkit. If you want to update your scheduled subscriptions, you can either call the [update](https://docs.stripe.com/api/subscription_schedules/update.md) endpoint, or update each subscription (one-by-one) in the [Subscriptions](https://dashboard.stripe.com/subscriptions) Dashboard. Customers can’t cancel scheduled subscriptions from their customer portal. They can only cancel live subscriptions. ### Go live with subscriptions After 24 hours, your scheduled subscriptions go live and charge customers on their applicable start dates. You can view all your live subscriptions in the [Subscriptions](https://dashboard.stripe.com/subscriptions) Dashboard. After the migration goes live, we recommend you monitor your subscriptions starting from the first payment. Make sure the charge dates and amounts for the migrated subscriptions match the specified [start_date](https://docs.stripe.com/api/subscription_schedules/create.md#create_subscription_schedule-start_date). Customers can cancel live subscriptions from their customer portal. ### Monitor subscriptions When you monitor your subscriptions after the migration goes live, look out for problems related to payment methods. For example, check transactions for unrecoverable issuer [decline codes](https://docs.stripe.com/declines/codes.md) such as `incorrect_number` and [take action](https://docs.stripe.com/get-started/data-migrations/pan-import.md#post-import-payment-declines) to make sure invoices get paid. Consider notifying customers with invalid payment methods through channels other than email, such as text messages or in-app notifications. When using automatic collection, check [open or past due invoices](https://docs.stripe.com/billing/collection-method.md#failed-incomplete-subscriptions) to make sure customers aren’t missing [default payment methods](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-payment_settings-save_default_payment_method), which might cause the invoice to be unable to attempt collection. ## View all migrations To view all of your migrations: 1. Select the migration you want to review in [**Migrations**](https://dashboard.stripe.com/billing/migrations). 1. To open a migration, click **View** in the dropdown menu. You can track the following fields: * Upload date * File name * Stripe billing migration id * Number of subscriptions * Migration status ## Cancel a migration If you identify any problems with the scheduled subscriptions, you can roll back the migration and revert the scheduled subscriptions. The Dashboard displays a timestamp to indicate if you can still cancel the migration using the toolkit. You have 10 hours from when you scheduled the subscriptions to cancel them. After 10 hours, the cancel option is disabled in the toolkit. 1. Find the migration you want to cancel in your [**Migrations**](https://dashboard.stripe.com/billing/migrations). 1. Click **Cancel migration** in the dropdown menu. ### Cancel after 10 hours To cancel the migration after 10 hours, you can either call the [cancel](https://docs.stripe.com/api/subscription_schedules/cancel.md) endpoint, or individually cancel each subscription (one-by-one) in the [**Subscriptions**](https://dashboard.stripe.com/subscriptions) Dashboard. ## Run multiple migrations You can run as many simultaneous subscription migrations as you want. For large migrations, divide the subscriptions into batches and start with a small batch. This can help you quickly identify any validation issues and save validation time. To start a new migration: 1. Click **Start new migration**. 1. Restart the migration process from [Download a CSV file](https://docs.stripe.com/billing/subscriptions/import-subscriptions-toolkit.md#download-csv). You can also find examples of CSV files for common migration use cases in the [Toolkit CSV reference](https://docs.stripe.com/billing/subscriptions/toolkit-reference.md#migration-use-cases). ## See Also * [Toolkit CSV reference](https://docs.stripe.com/billing/subscriptions/toolkit-reference.md)