This article covers
How to start a subscription to start in the past date?
Can I create a subscription for a previous term?
How to backdate subscriptions in bulk?
Do I have the option to backdate a subscription via API?
Error: 'Subscription start date cannot be before the billing period'.
When you create Subscriptions with the start date as a past date, you might get this error 'Subscription start date cannot be before the billing period'. It is not possible to create a subscription with a past start date through Chargebee's web interface. To do this, you need to reach out to our support to enable Backdating Subscription on your site and you can perform this by following the below steps.
1. Single Subscription: Only applicable with Backdating subscription enabled
I. Chargebee UI
II. Import subscription API
2. Multiple Subscriptions: Enabling Backdating subscription is not required
I. Bulk operation
Subscription changes are crucial to all businesses and regardless of these changes taking effect in the past or future, Chargebee gives you complete flexibility. Backdating Subscriptions and Invoices feature allows for subscription actions like upgrades, downgrades, price revisions, cancellations, and invoicing to be performed as on a past date.
Note: Backdating Subscription is not enabled by default, contact support to enable for your site.
I. Chargebee UI
Backdating Subscription Creation
Once this option is enabled on the backend, you can configure it navigate from Settings > Configure Chargebee > Billing > Backdating Subscription and Invoices. In the Backdating Subscriptions and Invoices page, click Enable. Then select the subscription actions that you want to allow backdating from the dropdown.
Creation: Enable this option to allow your Chargebee users to backdate a subscription by specifying a start date from the past while creating it.
To backdate a subscription creation on your Chargebee site, follow these steps:
Click Create Subscription and specify the subscription details.
The Billing Info section displays a new option Choose date under the Start date for the subscription. You can select this option and select a date from the past to specify the exact subscription start date. You can select a date for up to one plan term in the past. For example, in the case of a monthly plan, the subscription can be backdated for up to one month in the past from the day of backdating. For a weekly plan, the subscription can be backdated for up to one week in the past from the day of backdating.
In the Invoicing Options section, select Immediately. Click Set the Invoice date to a past date, and select a date using the calendar.
You can backdate the invoice by up to one plan term or one month in the past, whichever is shorter. However, you can not select a date that is earlier than the subscription start date. Click here to know more information.
II. Import Subscription API
You can make use of this API call to import a subscription mentioned in the link below,
PC 1.0: Import subscription
PC 2.0: Import subscription for Items
This API is not enabled for live sites by default. Please contact email@example.com to get this enabled.
Apart from the required and optional parameters you pass to import a subscription, you need to pass the below parameters compulsorily to have the subscription creation backdated.
-d started_at=timestamp(UTC) in seconds
For example, the subscription was created on 10 Jan 2023 at 12:43, and the subscription start date was set for
curl https://sitename-test.chargebee.com/api/v2/customers/AUS/import_for_items \ -u APIkey:\ -d subscription_items[item_price_id]="cbdemo_advanced-USD-monthly" \ -d subscription_items[quantity]=1 \ -d status="active" \ -d started_at=1670223914
Note: You also choose different activation date from start date using activated_at parameter.
2. Bulk Operation
This option is to only import subscription from other billing platform with backdated subscriptions. In order to backdate existing subscription in Chargebee you need to enable backdating subscription and use Update subscription API.
Step 1: Navigate to Import & Export data, steps provided below respectively:
You can perform this action from Settings > Configure Chargebee > Import & Export Data > Choose a Bulk Operation > Subscriptions > Import Subscription
You can perform this action from Settings > Configure Chargebee > Import & Export Data > Choose a Bulk Operation > Subscriptions > Import Subscription for items
Step 2: Download the sample CSV file
You can download the CSV ‘import_subscriptions_sample_data.csv’ file to update your subscription data.
Now, you can update the current subscription price.
- Your CSV data file should contain all the columns specific to the operation you are performing. The sample CSV file has most of the columns required for the operation.
- Do not edit the column labels in the sample file and make sure the file extension is .CSV.
- You can update this sheet with the data exported from the Invoice level.
Step 4: Drag and drop your data file into the web interface or upload it
Please refer to the Bulk operations document if you have received any errors while uploading the file.
Chargebee allows you to perform the following actions Backdating Subscription Creation Backdating Subscription Changes Backdating Subscription Cancellation Backdating Subscription Reactivation Backdating Charges and Quick Charge