# Backdate subscriptions

Learn how to backdate subscriptions.

Backdating a subscription lets you set its start date in the past. This can be useful when migrating to Stripe or keeping records. Use `backdate_start_date` to set the past start date. You can choose whether to bill the customer for the elapsed time. You can also set the next billing date.

## Before you begin

- Starting with [API version 2025-04-30](https://docs.stripe.com/changelog/basil.md#2025-04-30.preview), how backdating works depends on the subscription’s [billing_mode](https://docs.stripe.com/api/subscription_schedules/create.md#create_subscription_schedule-billing_mode):
  - Use `billing_mode=classic` to create a single prorated line item for the backdated period.
  - Use `billing_mode=flexible` to generate one line item for each natural billing period that occurs during the backdated period, which behaves similarly to regular billing.
- Backdating isn’t supported when an invoice has more than 250 line items, which is the default limit.

## Backdating and charging users

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

#### Dashboard

To charge for backdated time using the Dashboard:

1. Go to the **Payments** > [Subscriptions](https://dashboard.stripe.com/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 period 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* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) for the time between the backdated start date and the current time.

### How Stripe calculates backdated charges

With `billing_mode=flexible`, Stripe creates a separate line item for each natural billing period in the backdated period, as if Stripe had billed each cycle normally.

With `billing_mode=classic`, Stripe creates a single prorated amount. To calculate it, Stripe uses a hypothetical billing interval that starts on `backdate_start_date`. For example, for a monthly subscription billed on the first of each month:

- **Backdated to 15 February (non-leap year):** The hypothetical month runs from 15 February to 15 March (28 days). The charge for 15 February to 1 March covers 14 of those 28 days – half the normal monthly charge.
- **Backdated to 15 January:** The hypothetical month runs from 15 January to 15 February (31 days). The charge for 15 January to 1 February covers 17 of those 31 days – approximately 54.8% of the normal monthly charge.

Think of the backdated date as the original start date. The updated start date is when the first full billing period begins.

#### API

To charge for backdated time using the API, create a backdated subscription by passing the `customer`, `price`, and `backdate_start_date`.

```curl
curl https://api.stripe.com/v1/subscriptions \
  -u "<<YOUR_SECRET_KEY>>:" \
  -d "customer={{CUSTOMER_ID}}" \
  -d backdate_start_date=1575176400 \
  -d "items[0][price]={{PRICE_ID}}"
```

This creates an *invoice* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) for the time between the backdated start date and the current time.

### How Stripe calculates backdated charges

With `billing_mode=flexible`, Stripe creates a separate line item for each natural billing period in the backdated period, as if Stripe had billed each cycle normally.

With `billing_mode=classic`, Stripe creates a single prorated amount. To calculate it, Stripe uses a hypothetical billing interval that starts on `backdate_start_date`. For example, for a monthly subscription billed on the first of each month:

- **Backdated to 15 February (non-leap year):** The hypothetical month runs from 15 February to 15 March (28 days). The charge for 15 February to 1 March covers 14 of those 28 days – half the normal monthly charge.
- **Backdated to 15 January:** The hypothetical month runs from 15 January to 15 February (31 days). The charge for 15 January to 1 February covers 17 of those 31 days – approximately 54.8% of the normal monthly charge.

Think of the backdated date as the original start date. The updated start date is when the first full billing period begins.

#### Checkout

## Checkout

> Creating backdated subscriptions with [Checkout](https://docs.stripe.com/payments/checkout.md) is in [private preview](https://docs.stripe.com/release-phases.md).

### Backdate subscriptions on Checkout

Enter your email to request access.

```bash
curl https://docs.stripe.com/preview/register \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Referer: https://docs.stripe.com/billing/subscriptions/backdating" \
  -d '{"email": "EMAIL", "preview": "checkout_beta_preview"}'
```

### Before you begin

- Use [API version](https://docs.stripe.com/api/versioning.md) `2026-09-30.preview`
- Use the [items](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-items) parameter instead of `mode` and `line_items`.
- Checkout backdating doesn’t support [classic billing mode](https://docs.stripe.com/billing/subscriptions/billing-mode/compare.md). If `billing_mode` is omitted, it defaults to `flexible`.
- This preview doesn’t support [free trials](https://docs.stripe.com/payments/checkout/free-trials.md).

### Create a backdated subscription with Checkout

To charge for backdated time using [Checkout](https://docs.stripe.com/payments/subscriptions.md), create a Checkout Session with `items[].subscription` and pass the `customer`, `price`, and `backdate_start_date`. For more details, see the [subscription item API reference](https://docs.stripe.com/api/checkout/sessions/create.md?api-version=2026-09-30.preview#create_checkout_session-items-subscription).

Replace the example `backdate_start_date` with a Unix timestamp in the past, no more than one billing period before the current time.

```curl
curl https://api.stripe.com/v1/checkout/sessions \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-09-30.preview" \
  --data-urlencode "success_url=https://example.com/checkout/success?session_id={CHECKOUT_SESSION_ID}" \
  -d "customer={{CUSTOMER_ID}}" \
  -d "items[0][type]=subscription" \
  -d "items[0][subscription][backdate_start_date]=1575176400" \
  -d "items[0][subscription][billing_mode][type]=flexible" \
  -d "items[0][subscription][items][0][price]={{PRICE_ID}}"
```

The response contains `session.url`. Stripe populates the created subscription reference after the customer completes check out.

This creates an *invoice* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) with charges for the time between the backdated start date and the current time. Stripe generates separate line items for each natural billing period that occurred during the backdated period. This means that each cycle is treated as if Stripe billed it normally during that time.

## Backdating without charging users

You can backdate a subscription without charging the customer for the backdated period (for example, when migrating to Stripe). Pass `proration_behavior: 'none'` when you create the subscription. This sets `start_date` to the same value as `backdate_start_date` without creating a charge for that time.

> If you use `proration_behavior: 'none'` with `billing_mode=flexible`, no invoice is generated for the backdated billing periods. Because flexible billing mode calculates credit prorations based on previously debited amounts, having no debit for the backdated periods means that subsequent subscription updates or cancellations don’t generate credit prorations for that time. This differs from classic billing mode, which calculates credit prorations independently of prior debits. For details, see [Compare classic and flexible billing mode](https://docs.stripe.com/billing/subscriptions/billing-mode/compare.md#subsequent-proration-behavior-after-backdating-without-an-initial-charge).

## Backdating and setting the billing cycle anchor

To backdate a subscription and set the billing cycle anchor to a date in the future, combine `backdate_start_date` with `billing_cycle_anchor`. This creates a prorated item on the next invoice for the time between the backdated start date and the billing cycle anchor. When migrating subscriptions to Stripe, you can carry over their next billing dates from your previous system while charging customers for elapsed time.

For example, you’re migrating on 15 October. A subscription started on 1 September, and its next billing date is 1 November. To migrate the subscription, create a new subscription with:

- `backdate_start_date` set to 1 September.
- `billing_cycle_anchor` set to 1 November.

```curl
curl https://api.stripe.com/v1/subscriptions \
  -u "<<YOUR_SECRET_KEY>>:" \
  -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 and discounts

When you apply a [coupon](https://docs.stripe.com/billing/subscriptions/coupons.md) to a backdated subscription, the coupon’s duration starts counting from the backdated start date, not from the date you make the API call. This means the coupon’s duration is consumed by the backdated period.

For example, if you create a subscription on 1 March with `backdate_start_date` set to 1 January and apply a coupon with `duration=repeating` and `duration_in_months=2`, the coupon applies to the January and February billing periods (the 2 months starting from 1 January). Since the coupon’s 2-month duration has been fully consumed by the backdated period, it doesn’t apply to the March invoice or any future invoices, and the discount is removed from the subscription item.

If you want the coupon to apply to current and future invoices after the backdated period, the coupon’s duration must be longer than the backdated period. Using the same example, a coupon with `duration_in_months=3` would cover January, February and March, applying the discount to the first invoice after the backdated period.

> If a coupon’s duration is shorter than or equal to the length of the backdated period, the discount only applies to invoices within the backdated period. It won’t carry forward to any new invoices after the backdate.

The following table summarises how coupon duration interacts with backdating:

|  |
| Coupon duration | Behaviour with backdating |
| `once` | Applies only to the first invoice, which covers the backdated period. |
| `repeating` (N months) | Duration starts from the backdated start date. If N is less than or equal to the backdated period, the discount expires before any future invoices are created. |
| `forever` | Applies to all invoices, including those in the backdated period and all future invoices. No special considerations. |

## Backdating an update

To set the effective date of [prorations](https://docs.stripe.com/billing/subscriptions/prorations.md) when updating a subscription, use the [proration_date](https://docs.stripe.com/api/subscriptions/update.md#update_subscription-proration_date) parameter. Pass an integer Unix timestamp that occurs within the current period of the subscription’s items. If the subscription uses a subscription schedule, make sure that the timestamp is before the start date of the next phase of the schedule.

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

## See also

- [Subscription schedules](https://docs.stripe.com/billing/subscriptions/subscription-schedules.md)
- [Migrate subscriptions to Stripe](https://docs.stripe.com/billing/subscriptions/migrate-subscriptions.md)
