Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Billing
OverviewAbout the Billing APIs
Subscriptions
    Overview
    How subscriptions work
    Get started
    Quickstart
    Plan an integration
    Build an integration
    Use cases
    About subscriptions
    Enable billing mode
    Configure subscription events
    Entitlements
    Subscription invoices
    Subscription schedules
    Recurring pricing models
    Strong Customer Authentication (SCA)
    Set up subscriptions
    Configure collection methods
    Embed a pricing table
    Set billing cycles
    Manage subscriptions
    Migrate subscriptions to Stripe
      Migrate subscriptions using a toolkit
      Migrate subscriptions using Stripe APIs
    Set product or subscription quantities
    Mixed interval subscriptions
    Backdate subscriptions
    Set trial periods
    Handle subscriptions with deferred payment
    Apply coupons
    Modify subscriptions
    Manage subscription payment methods
    Analytics
    Manage subscriptions on iOS
Invoicing
Usage-based billing
Quotes
Customer management
Billing with other products
Revenue recovery
Automations
Test your integration
Tax
Overview
Use Stripe tax
Manage compliance
Reporting
Overview
Select a report
Configure reports
Reports API
Reports for multiple accounts
Revenue recognition
Data
OverviewSchema
Custom reports
Data Pipeline
Data management
HomeRevenueSubscriptionsMigrate subscriptions to Stripe

Migrate subscriptions to Stripe Billing using toolkit

Learn how to migrate your existing subscriptions to Stripe using the toolkit.

Use the Billing migration toolkit in the Stripe Dashboard to migrate your existing subscriptions from a third-party system, a home-grown system, or an existing Stripe account to Stripe Billing.

Before you begin

  1. If you haven’t already, review the migration stages.
  2. Set up a Stripe Billing integration before you begin migration. This is a one-time setup that you don’t need to repeat for future migrations.
  3. Request a PAN data import 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.
  4. 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. Go to Dashboard > Subscriptions > Migrations.

    Alternatively, you can click the overflow menu () next to + Create subscription, and select Migrate subscriptions.

  2. 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, Multi-price items, and Ad-hoc pricing). You can also find examples of CSV files for common migration use cases.

  1. Click Download CSV template.

  2. 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:

    AttributeTypeExampleDescription
    customer (required)Stripe Customer IDcus_xxx1The identifier of the customer to create the subscription for.
    start_date (required)Timestamp in epoch UNIX format1658179441Determines 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 IDprice_1LDGNmDK0D4Fox2RxIaXQkBpYou 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}.
    quantityNumber1Determines 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.*Stringsubscription_1Attach 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_taxBooleanfalseSpecify true to use automatic tax settings by Stripe Tax.
    billing_cycle_anchorTimestamp in epoch UNIX format1658179441Determines the next date to bill the subscription to the customer.
    couponStripe Coupon ID50_offThe identifier of the coupon to apply to this subscription.
    trial_endTimestamp in epoch UNIX format1658179441Sets 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_behaviorEnumcreate_prorations or noneDetermines if the subscription creates prorations after migration. The default value is create_prorations.
    collection_methodEnumcharge_automatically or send_invoiceWhen charging automatically, Stripe attempts to pay the underlying subscription at the end of each billing period 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_rateStripe Tax IDtxr_1LPcLzAWeZvbCyjpzDA4qs1lSets 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_dateTimestamp1658179441Determines 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.
    days_until_dueInteger30The 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_endBooleanfalseSpecify 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:

    AttributeTypeExampleDescription
    customer (required)Stripe Customer IDcus_xxx1The identifier of the customer to create the subscription for.
    start_date (required)Timestamp in epoch UNIX format1658179441Determines 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 IDprice_1LDGNmDK0D4Fox2RxIaXQkBpThe identifier of the price object, which must be a recurring price.
    items.0.quantityNumber1Determines 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 IDprice_1LujbnDCA5oQnOCew7kwa4T5The identifier of the price object, which must be a recurring price.
    items.1.quantityNumber1Determines 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_idStringsubscription_1Attach these key-value pairs to an object. This is useful for storing additional information about the object in a structured format.
    automatic_taxBooleanfalseSpecify true to use automatic tax settings by Stripe Tax.
    billing_cycle_anchorTimestamp in epoch UNIX format1658179441Determines the next date to bill the subscription to the customer.
    couponStripe Coupon ID50_offThe identifier of the coupon to apply to this subscription.
    proration_behaviorEnumcreate_prorationsDetermines if the subscription creates prorations after migration. The default value is create_prorations.
    collection_methodEnumcharge_automatically or send_invoiceWhen charging automatically, Stripe attempts to pay the underlying subscription at the end of each billing period 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_rateStripe Tax IDtxr_1LPcLzAWeZvbCyjpzDA4qs1lSets 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_dateTimestamp1705753518Determines 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.
    days_until_dueInteger30The 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_endBooleanfalseSpecify true if you want to cancel a subscription at the end of the period.
    add_invoice_items.0.amountNumber19.99A positive number. Use full units with decimals (such as 21.50).
    add_invoice_items.0.productStripe Product IDprod_PjfC3kWS58IoOXThe identifier of the product to add the invoice to.
    add_invoice_items.0.currencyStringusdA three-letter ISO currency code, in lowercase, for a supported currency.

    Ad-hoc prices CSV

    This example shows handling a subscription migration using ad-hoc pricing for existing products.

    Specify the following fields for an Ad-hoc pricing CSV file:

    AttributeTypeExampleDescription
    customer (required)Stripe Customer IDcus_xxx1The identifier of the customer to create the subscription for.
    start_date (required)Timestamp in epoch UNIX format1710937191Determines 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)Number19.99A positive number. Use full units with decimals (such as 21.50).
    adhoc_items.0.product (required)Stripe Product IDprod_NwSGSFZb7ENuTWThe identifier of the product that belongs with the ad-hoc price.
    adhoc_items.0.interval (required)day, week, month or yearmonthThe billing frequency.
    adhoc_items.0.currency (required)StringusdA three-letter ISO currency code, in lowercase, for a supported currency.
    adhoc_items.0.quantityNumber1Determines 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.amountNumber19.99A positive number. Use full units with decimals (such as 21.50).
    adhoc_items.1.intervalday, week, month or yearmonthThe billing frequency.
    adhoc_items.1.currencyStringusdA three-letter ISO currency code, in lowercase, for a supported currency.
    adhoc_items.1.quantityNumber1Determines 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.sourceNumberexternal:zuoraAttach 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_idStringsubscription_1Attach these key-value pairs to an object. This is useful for storing additional information about the object in a structured format.
    automatic_taxBooleanfalseSpecify true to use automatic tax settings by Stripe Tax.
    billing_cycle_anchorTimestamp in epoch UNIX format1713615591Determines the next date to bill the subscription to the customer.
    couponStripe Coupon IDblack_fridayThe identifier of the coupon to apply to this subscription.
    proration_behaviorEnumcreate_prorationsDetermines if the subscription creates prorations after migration. The default value is create_prorations.
    collection_methodEnumcharge_automaticallyor send_invoiceWhen charging automatically, Stripe attempts to pay the underlying subscription at the end of each billing period 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_rateStripe Tax IDtxr_1LPcLzAWeZvbCyjpzDA4qs1lSets 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_dateTimestamp in epoch UNIX format1705753518Determines 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.
    days_until_dueInteger30The 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_endBooleanfalseSpecify true if you want to cancel a subscription at the end of the period.
    add_invoice_items.0.amountNumber19.99A positive number. Use full units with decimals (such as 21.50).
    add_invoice_items.0.productStripe Product IDprod_PjfC3kWS58IoOXThe identifier of the product to add the invoice to.
    add_invoice_items.0.currencyStringusdA three-letter ISO currency code, in lowercase, for a supported currency.
  3. In the CSV file, specify the details of the subscriptions you want to export.

    For Stripe-to-Stripe migrations

    If you’re migrating subscriptions within Stripe accounts, refer to the CSV example 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. If there are any validation errors, you must resolve the errors to proceed.

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
  2. If everything is valid, click Start migration.

    If you see errors, click Cancel migration and restart the migration from Download a CSV file.

Track migration progress

After you review your uploaded subscriptions, track the progress of your migration:

Migration progressDescription

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 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 using the toolkit.

You can’t update scheduled subscriptions using the migration toolkit. If you want to update your scheduled subscriptions, you can either call the update endpoint, or update each subscription individually in the Subscriptions page of the 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 page of the 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.

Customers can cancel live subscriptions from their customer portal.

Monitor subscriptions

After the migration goes live, monitor your subscriptions for problems related to payment methods. For example, check transactions for unrecoverable issuer decline codes such as incorrect_number and take action 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 to make sure customers aren’t missing default payment methods, 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.

  2. 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

OptionalCancel 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. To cancel the migration after 10 hours, you can either call the cancel endpoint, or individually cancel each subscription in the Subscriptions page of the Dashboard.

  1. Find the migration you want to cancel in your Migrations.
  2. Click Cancel migration in the dropdown menu.

OptionalRun 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.
  2. Restart the migration process from Download a CSV file.

You can also find examples of CSV files for common migration use cases.

OptionalResolve 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.

  2. Review the processing_error column to see the errors.

  3. Correct all the errors. Common errors include:

    ErrorTroubleshooting
    Invalid datesMake sure all the dates are in epoch or Unix timestamp format.
    Incorrect start_date rangeMake sure the start_date for each subscription is at least 24 hours in the future.
    Missing dataMake sure every record contains the required fields.
    Incompatible price and taxMake sure prices for specified tax rates have the same tax_behavior (inclusive versus exclusive).
  4. Click Upload revised file to re-upload the corrected CSV (the CSV file size limit is 120 mb).

  5. Wait for re-validation to see the latest validation status.

Migration use cases

You can apply the migration use cases in this section to your own migration, if applicable. Timestamps in these examples are in Unix EPOCH format. The examples also include test customer and price IDs that you can use in a sandbox.

You can combine any Stripe-provided CSV template (Basic, Multi-price items, Ad-hoc pricing) with any of these examples as needed.

Migrate subscriptions with various pricing models

You can migrate subscriptions with flat-rate pricing, such as a basic plan at 100 USD per month or an advanced plan at 200 USD per month. These subscriptions can have one or more line items.

Example 1 (Basic): Migrate a basic 100 USD monthly subscription with a quantity of 2, starting on January 1. The subscription is charged automatically using the default payment method.

ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx12subscription_1nonecharge_automatically

Example 2 (Multi-price items): Migrate the following subscriptions starting on January 1, to be charged automatically using the default payment method:

  • A basic 100 USD monthly subscription with a quantity of 2
  • An advanced 200 USD monthly subscription with a quantity of 1
ATTRIBUTEcustomer (required)start_date (required)items.0.price (required)items.0.quantityitems.1.priceitems.1.quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx11price_xxx2subscription_1nonecharge_automatically

Example 3 (Basic): Migrate the following subscription starting on January 1, to be charged automatically using the default payment method:

  • A basic 100 USD monthly subscription with a quantity of 2
  • An ad-hoc invoice add-on fee of 20 USD
ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx12subscription_1nonecharge_automatically50prod_xxx1usd

You can also migrate subscriptions with ad-hoc pricing, in cases where you don’t have fixed pricing amounts.

Example 4 (Ad-hoc pricing): Migrate the following subscription starting on January 1, to be charged automatically using the default payment method:

  • A 153 USD ad-hoc monthly subscription with a quantity of 1
ATTRIBUTEcustomer (required)start_date (required)adhoc_items.0.amount (required)adhoc_items.0.productadhoc_items.0.intervaladhoc_items.0.currencyadhoc_items.0.quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx1prod_xxx11subscription_1nonecharge_automatically

Migrate subscriptions with different types of payment collection methods

You can collect payment for the migrated subscriptions either automatically with the default saved payment method or by sending an invoice that the customer can pay by the due date.

Example 1 (Basic): Migrate a yearly 500 USD subscription with a quantity of 1, starting on January 1, to be charged automatically using the default payment method.

ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx11subscription_1nonecharge_automatically

Example 2 (Basic): Migrate a yearly 500 USD subscription with a quantity of 1, starting on January 1. This subscription is billed using an invoice sent to the customer, with a 30-day due date.

ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx11subscription_1nonesend_invoice30

Migrate subscriptions at different stages of subscription service period

Example 1 (Basic): Migrate a subscription that’s due for renewal. For example, migrate a 100 USD monthly subscription with a renewal date of January 1. The subscription renews on the 1st of every month.

  • Set the start_date to the current renewal date, so the subscription is charged immediately.
  • Set the billing_cycle_anchor to the next renewal cycle date.
  • Set proration_behavior to none.
ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx1subscription_11706745600nonecharge_automatically

Example 2 (Basic): Migrate a paid subscription that’s in the middle of a billing period. For example, migrate a 100 USD monthly subscription with an original start date of December 25. The migration date is January 1, and the subscription renews on the 25th of every month.

  • Set backdate_start_date to the original start date of the subscription.
  • Set billing_cycle_anchor to the upcoming renewal date.
  • Set start_date to the migration date.
  • Set proration_behavior to none to avoid charging the customer again and keep the subscription in a scheduled state until the next billing period.
ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx1subscription_11706140800nonecharge_automatically1703462400

Example 3 (Basic): Migrate subscriptions with trials. For example, migrate a basic 100 USD monthly subscription starting on January 1. The subscription is under a trial until January 31. After the trial ends, the subscription is charged automatically using the default payment method.

ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx11subscription_11706659200nonecharge_automatically1703462400

Example 4 (Basic): Migrate past-due subscriptions. For example, migrate a 100 USD monthly subscription with a last cycle start date of December 25, which hasn’t been paid. Migrate this mid-cycle starting January 1, with a renewal date on the 25th of each month. This creates a prorated invoice from January 1 to January 25 that Stripe can attempt to collect payment for.

To migrate subscriptions that are in an active cycle but haven’t been paid in the previous system, set proration_behavior to create_prorations to immediately create an invoice and collect payment. This also enters the subscription into Stripe’s dunning flow, if the payment is still unpaid.

ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx11subscription_11706140800create_prorationscharge_automatically1703462400

Example 5: Migrate subscriptions that need to be canceled at the end of the cycle. After migration, you can choose whether or not to charge these subscriptions, based on the migration timing (mid-cycle or at renewal).

They’re canceled at the end of that period. For example, migrate a basic 100 USD monthly subscription starting on January 1. This subscription is automatically canceled on January 31.

ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx11subscription_11706140800nonecharge_automatically1703462400TRUE

Migrate subscriptions with taxes

Example 1 (Basic): Migrate subscriptions to automatically calculate tax by enabling Stripe Tax. For example, migrate a 100 USD monthly subscription starting January 1, with Stripe Tax enabled to calculate the tax automatically.

The migration toolkit validates if you enabled Stripe Tax in advance, and if customers provided the required fields to calculate tax automatically. Make sure your customers provide the necessary information before migration.

ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx11subscription_1TRUEnonecharge_automatically

Example 2 (Basic): Migrate subscriptions and calculate tax using manual tax rates. For example, to migrate a basic 100 USD monthly subscription starting on January 1, with 10% tax created using manual tax rates:

  • Create a 10% manual tax rate in the Dashboard (Product catalog > Coupons).
  • Use the tax rate ID in the migration CSV template.
ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxx11704067200price_xxx11subscription_1FALSE1706140800nonecharge_automaticallytxr_xxx1

Example 3 (Basic): If you use an external tax provider, such as Avalara or Vertex:

For migrated subscriptions where tax is already calculated, leave both automatic_tax and default_tax_rate blank in the CSV.

After the subscriptions are migrated and live, they automatically follow the tax integration workflows you set up for new subscriptions in your Billing integration.

Migrate subscriptions with discounts

The migration toolkit supports only one coupon per subscription.

You can migrate subscriptions with discounts that are applied after migration. For example, to migrate a 100 USD monthly subscription starting January 1, with a 10% forever discount:

  • Create a 10% coupon in the Dashboard (Product catalog > Coupons).
  • Use the coupon name in the migration CSV file.
ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.third_party_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_endadd_invoice_items.0.amountadd_invoice_items.0.productadd_invoice_items.0.currency
FIELDcus_xxxx11704067200price_xxx11subscription_1sample_couponnonecharge_automatically

Migrate subscriptions within Stripe accounts

The steps to migrate subscriptions from one Stripe account to another are the same as when migrating from a third-party system. Use the Billing migration toolkit to export the subscription data for your CSV file from your old Stripe account.

To create a migration CSV for a Stripe-to-Stripe migration:

  1. Export the subscriptions from the old Stripe account using the Dashboard.
  2. Use the following CSV example as a reference to map fields between the old and new Stripe accounts.
ATTRIBUTEcustomer (required)start_date (required)price (required)quantitymetadata.old_Stripe_sub_idautomatic_taxbilling_cycle_anchorcoupontrial_endproration_behaviorcollection_methoddefault_tax_ratebackdate_start_datedays_until_duecancel_at_period_end
FIELDExport field: Customer ID (from previous account export)Export field: Current Period End UTC (from previous account export)Respective price id in the new accountExport field: Quantity (from previous account export)Export field: id (from previous account export)TRUE if using Stripe tax in new account, else FALSEFuture billing date in new accountRespective coupon in the new account, if anyRespective trial in the new account, if anycreate_prorations in case of prorated invoice, else nonecharge_automatically or send_invoiceRespective tax rate in the new account, if anyExport field: Start Date UTC (from previous account export)Specify if using send_invoice as collection methodSpecify if a subscription is due to be canceled at period end

Migrate subscriptions with multiple phases

The migration toolkit doesn’t support adding multiple phases directly to a subscription. We recommend the following approach:

  1. Use the migration toolkit to migrate the initial phase of the subscription.
  2. After the migration, add the additional phases to the migrated subscription schedules. To do so, call the update endpoint or use the Stripe Subscriptions Dashboard.
  3. Adjust the start_date of the migration to allow enough time between the scheduled and live status changes. This allows you to make the phase updates before the subscriptions go live.

CSV reference

The migration tookit requires you to upload a CSV that has specific information in the correct fields.

CSV prerequisites

Before you create or download a CSV file, make sure you have access to the following information:

Customer objectAll customers must have a default payment method attached to them. Without a default payment method, future subscription payments will fail. If you don’t have a default payment method set for your customers after migrating their data, you have two options:
  • Obtain the user’s consent or rely on their past payment behavior to determine the default payment method on a per-customer basis.
  • Use this provided script to attach the latest payment method to your customers and make it the default method.
Automatic taxIf you use Stripe Tax (where you set automatic tax to true), all customers must have either addresses or postal codes (or both) per country. Stripe needs this information to calculate taxes for the given subscriptions.
collection_methodIf you’re using the send_invoice payment method for your subscriptions:
  • Add email addresses to the required customers.
  • Add the days_until_due parameter in the migration CSV file to state the validity of invoices for each customer.
Dates
  • To ensure accurate timing, pay special attention to timezones when you create epoch date-time formats for your migration CSV file.
  • For the toolkit, set the start_date with a buffer of at least 24 hours in advance from the CSV upload time. We create a subscription schedule so that you get this buffer time to confirm and verify accuracy. When the start date begins, the subscription changes from scheduled start to live state.
Coupons
  • If the subscription schedule or subscription has billing cycle anchor in the future and proration_behavior set to none, updating these objects unsets the coupon. Re-apply the coupon if you make any updates to the subscription schedule or subscription.
  • To migrate a subscription with ongoing discount_behavior:
    • Set a future phase that removes the coupon at the correct date instead of waiting for an expiration.
    • Create a coupon for each subscription, with the duration being different on each one so they all expire correctly.
Stripe to Stripe migrationUsers can migrate subscriptions within Stripe accounts. You must input Customer IDs and Price IDs (and both Coupon IDs and Tax IDs, if using them) into the template associated with your destination Stripe account, and not your source Stripe account. The migration tool generates an error if you input IDs associated with your source account.

Full CSV specification

AttributeTypeDescription
customer (required)Stripe Customer IDThe identifier of the customer to create the subscription for.
start_date (required)Timestamp in epoch UNIX formatDetermines 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 IDMust be a recurring price. If migrating multiple items, use items.x.{price, quantity} format instead. Ad-hoc prices are also supported with adhoc_items.x.{amount, interval, product, currency}.
quantityNumberDetermines 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.x.price (required)Stripe Price IDThe ID of the price object. Must be a recurring price.
items.x.quantityNumberDetermines 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.x.amount (required)NumberA positive number. Use full units with decimals (such as 21.50).
adhoc_items.x.product (required)Stripe Product IDThe identifier of the product that belongs with the ad-hoc price.
adhoc_items.x.interval (required)day, week, month or yearThe billing frequency.
adhoc_items.x.currency (required)StringA three-letter ISO currency code, in lowercase, for a supported currency.
adhoc_items.x.quantityNumberDetermines 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_sourceStringIf you’re doing a Stripe-to-Stripe migration, enter internal:Stripe.
metadata_*StringAttach these key-value pairs to an object. This is useful for storing additional information about the object in a structured format.
automatic_taxBooleanSpecify true to use automatic tax settings by Stripe Tax.
couponStripe Coupon IDThe identifier of the coupon to apply to this subscription.
currencyStringThree-letter ISO currency code, in lowercase. Must be a supported currency. Used for currency selection with multi-currency prices.
trial_endTimestampSets the phase to trialing from the start date to the trial_end date. You must specify a value that’s before the cycle/phase end date, and you can’t combine it with the trial.
proration_behaviorcreate_prorations or noneDetermines if the subscription creates prorations after migration. The default value is create_prorations.
collection_methodcharge_automatically or send_invoiceWhen charging automatically, Stripe attempts to pay the underlying subscription at the end of each billing period 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_rateStripe Tax IDSets 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.
backdate_start_dateTimestamp in epoch UNIX formatDetermines 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.
billing_cycle_anchorTimestampDetermines the future dates of when to bill the subscription to the customer.
days_until_dueIntegerThe 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_endBooleanSpecify true to cancel a subscription at the end of the period.

See also

  • Migrate subscriptions using Stripe APIs
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Join our early access program.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc