Time Machine is a simulation feature which imitates the key characteristics, behaviours and functions of the billing configurations. It is a virtual time travelling tool which facilitates the integration testing process by carrying out subscription renewals, dunning, webhooks etc on a hypothetical time frame. You can use Time Machine in the test site to verify if the billing rules configured in your site adhere to your expectations before configuring it in real time. This feature can be used in both API and UI versions.
You can access Time Machine by navigating to Settings > Configuration & Data.
Once you enter the Time Machine feature, the existing subscriptions and customer details will be erased, leaving you with an empty site. The plans and site settings do not get cleared however.
By default you will be taken 6 months back in time on entering the Time Machine. The time period can be changed to anything between a fortnight, a month, a quarter and a year by navigating to Start Afresh in the right corner of the timeline.
Let's say you enter Time Machine on July 6th, you will be taken 6 months backwards in time to January 6th.
Now, you can proceed to performing the billing operations as usual albeit for the fact that you are in a hypothetical time line.
For the starters, let's create a subscription in the present date, i.e January 6th.
As per the plan, the subscription is in the trial state for 20 days from the day it is created which means it will become active on January 26th.
Now instead of waiting for 20 long days for the subscription's trial period to end, you can actually set your Time Machine to January 27th and watch the status of the subscription change after the trial period's conclusion.
The subscription is in cancelled status since payment method has not been added
Time Machine, thus allows you to foresee the status of your subscriptions and the changes they are subject to under various such use cases.
Consider a scenario when the initial attempt to charge the card fails, Chargebee has an automated process where the payment is attempted for a maximum of three times after which the subscriptions gets cancelled and the invoice is marked as unpaid or voided.
The time interval between each retry can be configured as you wish by navigating to
Settings >Site Settings >Dunning Settings.
Time machine comes to your advantage when you want to ensure that the dunning feature works as configured.
Say a subscription is created on 15th February for a customer whose card has insufficient funds, an attempt is made to charge the card at the end of the trial period. The transaction fails and the payment is due.
You can travel forward in time to 26th February and watch this happen,
If and when the dunning settings are enabled, the subscription is not cancelled right away and the transaction is reattempted three more times at the specified time intervals.
The subscription is then cancelled and the invoice is marked as unpaid,
You can monitor the entire billing process by travelling forward in time using Time Machine.
While exiting Time Machine also, your customer data will be cleared and you will be taken to the present date from where you started.
An excellent feature that has simplified the process of testing your site, Time Machine comes with its own set of constraints.