Docs

Time Machine 

Time Machine is a simulation feature that allows you to test the billing configurations in Chargebee. You can test features such as dunning, consolidated invoicing, subscription states, scheduled subscription actions, webhooks, and more, by virtually traveling back in time. This allows you to understand and verify how the billing rules configured in your test site will work in real time.

Time Machine is available only on your test site. This feature is in public beta testing, therefore, you may encounter certain functional bugs and limitations.

Venturing into Time Machine 

When you venture into the Time Machine, you travel back in time. You can check the settings that you have configured in your test site by moving forward in time.

For example, let us assume that today is July 1, 2018. Using the time machine, you can move back a year (which is July 1, 2017). You can then move forward in time until the present day(July 1, 2018) to check how your subscriptions, dunning settings, invoicing, and more have worked.

Simply put, the Time Machine allows you to foresee the status of your subscriptions and the changes they are subject to under various scenarios.

To access the Time Machine:

  • Click Settings > Configure Chargebee > Time Machine
  • Choose the feature that you wish to test. Available options are:

    • Blank Slate When you select this option, default scenarios will not be created for you. You will have to manually create the data for the scenario that you wish to test.
    • Dunning - Dunning is a process in Chargebee that allows you to retry payment failures. This option will create scenarios to test the dunning feature such as payment retries, the interval between payment retries, and more. Read more on Dunning.
    • Consolidated Invoices - The Consolidated Invoicing feature allows you to consolidate all the charges across multiple subscriptions for a single customer into a single invoice rather than sending multiple invoices. This option will create scenarios to test the consolidated invoice feature. Please note that you will have to get Consolidated Invoices enabled for your account before you try this feature. Contact support  to enable this feature. Learn more.
    • Subscription states - This option will create scenarios to check the various states of subscriptions (trial, active, future, canceled, paused, and the transition between these statuses).
    • Scheduled Subscription Actions - This option will create scenarios to test scheduled subscription actions such as cancellation, plan change, and more.
    • Invoicing Features - This feature will create scenarios to check various invoicing features such as credit notes, advance invoicing, renewal invoices, and more.
  • Select the tenure to travel back. Available options are one fortnight, one month, one quarter, six months, one year, 18 months, and four years. The default option selected is Six months.

  • Click the Enter Time Machine button.

Note

Once you enter the Time Machine feature, the existing subscriptions and customer details will be erased, leaving you with an empty site. If you wish to take a backup of the data, we recommend you to export the data.

  • In the Your data in the test site will be cleared dialog that opens, click Confirm.

You will be taken back in time.

Testing Subscription Status 

Let's say you enter Time Machine on July 6, 2018, and your selected travel back tenure is 6 months. Then, you will be taken 6 months backward in time to January 6, 2018.

Now, you can proceed with performing the billing operations as usual, but you will be in a hypothetical time frame.

For starters, let's create a subscription in the present date - May 30, 2019. As per the plan definition, the subscription's status is In trial for 14 days from the day it is created which means it will become active on June 13, 2019.

Now instead of waiting for 14 long days for the subscription's trial period to end, you can move the timeline to June 14 and watch the status of the subscription change at the end of the trial period.

The subscription is Cancelled as there is no payment method added.

Testing Dunning Settings 

Consider a scenario where the initial attempt to charge the card fails, Chargebee has an automated process where the payment is attempted for a maximum of twelve times and the invoice is marked as Unpaid.

You can configure the time interval between each retry by navigating to Settings > Configure Chargebee > Dunning for Offline Payments/Dunning for Online Payments.

Time machine comes to your advantage when you want to check if the dunning feature works as configured.

Say a subscription is to be renewed on December 30 for a customer whose card has insufficient funds, an attempt is made to charge the card. The transaction fails, and the payment is due.

You can travel forward in time to January 14 (one day after the configured time) and see what happens to the subscription.

When Dunning is configured, twelve attempts are made to collect the payment before the subscription is canceled and the invoice is marked as Unpaid. You can check the status of each retry by moving forward in time.

You can only move forward in time and not backward. If you wish to move back in time when you are in the time machine, click the Suspension icon (three dots) and select Start Afresh. Please do note that this process will delete all your customer data once again.

You can exit the time machine by clicking the Exit time machine option. When you exit the Time Machine, all the customer data in the time machine mode will be deleted.

Constraints in Time Machine 

  • Customer Data is erased when you enter the Time Machine. There is no way that you can recover this information. If you wish to take a backup, we recommend you to export the data before using Time Machine.
  • Time Machine allows you to only travel back in time; you cannot move forward from the present date to check how your subscriptions, dunning settings, invoicing, and more has changed during this period. Learn more.
  • Similarly, after selecting the tenure to travel back to test a particular feature you can only move to a future date, you cannot move to a date in the past. For example, consider the present date as July 5 and you have selected the travel back date as July 1 then you can move from July 1 to July 5, but you cannot move back from July 1 to June 25. Emails are not sent while in the time machine mode. However, they are logged in the Email logs tab for reference.
  • Bulk operations are not available while Time Machine is in use.
  • Reminder emails (subscription renewal, future subscription) are not generated or logged.
  • Time Machine can handle only a maximum of five subscriptions and customers at a time.
  • You cannot create webhooks for reminder event notifications.

Frequently Asked Questions 

1. All my data got deleted when entering the time machine, can I undo this operation?

All the customer related data will get deleted upon entering the time machine. This is a standard operation because the time machine can handle only a maximum of 5 subscriptions and customers owing to the limit on the server's resource utilization.

You cannot undo the delete operation. That said, Chargebee provides sample data to repopulate your test site.

2. How do I repopulate my test site data?

To repopulate the test site data:

  • Click Settings > Delete or Populate test site data.
  • In the Delete or Repopulate sample data page that opens, click Repopulate Data.

3. Can I take a backup of my data before I enter the time machine?

Yes, you can export the data before running the time machine and then import it back into Chargebee using the bulk operations. The Export option is available for each setting (Subscription, Plan, and more) in the corresponding page. More on the bulk operations here.

4. How can I test the emails feature if it is not supported in the Time Machine mode?

Emails regarding payment failure will not be sent, but it will be generated. You can check them in the Email logs tab (Logs > Email Logs).

Reminder emails will not be generated nor sent in the time machine mode. If you wish to check them you will have to manually do it in the test site.

5. Can I configure Webhooks when in Time Machine mode?

Yes, you can. Learn about configuring Webhooks.

Note

Reminder event notifications are not supported.

See also

API Reference

Was this article helpful?
Loading…