Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
Billing
    Overview
    About the Billing APIs
    Subscriptions
      Overview
      Quickstart
      Use cases
      Build your integration
      Subscription features
        Subscription invoices
        Subscription schedules
        Subscription pricing
        Recurring pricing models
        Embed a pricing table
        Start subscriptions
        Set quantities
        Set billing cycles
        Backdate subscriptions
        Subscribe to multiple items
        Set trial periods
        Apply coupons
        Migrate subscriptions to Stripe
        How credit prorations are calculated
        Subscription payments
        Subscription payment methods
        Integrate with third-party payment processing
        Collection methods
        Share a link to update payment details
        Strong Customer Authentication (SCA)
        Manage subscriptions
        Modify subscriptions
        Manage pending updates
      Analytics
    Invoicing
    Usage-based billing
    Connect and Billing
    Tax and Billing
    Quotes
    Revenue recovery
    Automations
    Scripts
    Revenue recognition
    Customer management
    Entitlements
    Test your integration
Tax
Reporting
Data
Startup incorporation
HomeFinance automationBillingSubscriptionsSubscription features

Backdate subscriptions

Learn how to backdate subscriptions.

Copy page

You can backdate a subscription to bill customers for time that has already elapsed. This is often used when migrating to Stripe or for record keeping purposes. The backdate_start_date field specifies the subscription’s backdated start date. You also have the option to bill customers for this elapsed time and set the next billing date.

Backdating and charging users

Sometimes users can have access to your service before you create a subscription for them, and you want to charge them for that access.

To charge users for this time through the Dashboard:

  1. Go to the Payments > Subscriptions page.

  2. Click +Create subscription.

  3. Find or add a customer.

  4. Enter the pricing and product information.

  5. In the Subscription details section, select the start and end dates of the subscription. To backdate it, select a start date in the past.

  6. Select the date that you want to start the billing cycle on.

  7. (Optional) Set the Payment or Advanced options.

  8. Click Create subscription. The subscription starts on the date you selected.

This creates an invoice with a prorated amount for the time between the backdated start date and the current time. The prorated amount is calculated based on an imagined interval that starts on the backdated start date. For example, if the billing interval is monthly on the first of the month, and you set the backdate_start_date to 15 February (in a non-leap year), the proration calculation is based on a month running 15 February to 15 March. Because that imagined month is 28 days, the prorated amount for the 14 days of 15 February to 1 March is exactly half the amount of a normal monthly charge.

Similarly, if you set the backdate_start_date to 15 January, the proration calculation is based on an imagined month running 15 January to 15 February. Because that month is 31 days, the pro-rata amount for the 17 days of 15 January to 1 February is 17 divided by 31 (or 0.548) of a normal monthly charge.

Another way to think about the calculation is to look at the backdated start date as the original start date and the beginning of the first full billing period as an updated start date.

Backdating without charging users

You can also backdate a subscription without charging the customer for the backdated period, which you can use if you’re migrating to Stripe. To do so, pass proration_behavior: 'none' when you create the subscription. That sets the start_date to the same value as backdate_start_date, but it doesn’t charge the customer for backdated time.

Backdating and setting the billing cycle anchor

You can combine backdate_start_date with billing_cycle_anchor to backdate a subscription and set the billing cycle anchor to a date in the future. This creates a pro-rata item on the next invoice for the time between the backdated start date and the billing cycle anchor. You can use this if you’re migrating to Stripe and need to carry over the next billing date for your subscriptions while billing customers for elapsed time.

For example, say it’s 15 October and you’re migrating to Stripe. You have a subscription that started on 1 September, and the next billing date is 1 November. To migrate that subscription, create a new subscription and set backdate_start_date to 1 September and billing_cycle_anchor to 1 November.

Command Line
cURL
curl https://api.stripe.com/v1/subscriptions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -d backdate_start_date=1575176400 \ -d billing_cycle_anchor=1572580800 \ -d "items[0][price]"=
{{PRICE_ID}}

This immediately issues an invoice for the pro-rata amount covering the time between 1 September and 1 November. It also sets the start_date of the subscription to 1 September. Stripe issues the next invoice on 1 November.

Backdating an update

To set the effective date of prorations when updating a subscription, use the proration_date parameter. Pass an integer Unix timestamp within the subscription’s items’ current period. If the subscription is backed by a subscription schedule, make sure that the timestamp is before the start date of the next phase of the subscription schedule.

You can set a proration_date earlier than the current period only during the first period of a backdated subscription. In this case, the proration_date can be on or after the subscription[start_date] (backdated start date). In all other cases, the proration_date can’t be before the current_period_start.

Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc