# Time machine

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


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 executing them in real time. This feature can be used in both API and UI versions.

View this [doc](https://www.chargebee.com/docs/time-machine.html) for more details.

**Note:** In order to use Time Machine via API , you need to first "enable" the Time Travel option which is available under **Settings** > **Configure Chargebee** > **Time Machine**.

## Sample Time machine

```json
{
  "destination_time": 1585065021,
  "genesis_time": 1585065021,
  "name": "delorean",
  "object": "time_machine",
  "time_travel_status": "succeeded"
}
```

## Time machine attributes

## Input Parameters

- `name` (required, string, default=delorean, max chars=50)
  The name of the time machine. Currently only **delorean** is allowed

- `time_travel_status` (required, enumerated string, default=not_enabled)
  The current status of time travel
  Possible enum values:
    - `not_enabled`
      Time travel has not been enabled for the site
    - `in_progress`
      Time travel is in progress
    - `succeeded`
      Time travel has succeeded.
    - `failed`
      Time travel has failed. Check the failure code and failure reason attributes for further details. **Note:** The time machine needs to be reset by starting afresh again.

- `genesis_time` (required, timestamp(UTC) in seconds)
  The start time of the time machine. Specified when 'starting afresh'

- `destination_time` (required, timestamp(UTC) in seconds)
  The destination time to which the time machine is travelling (or has traveled)

- `failure_code` (optional, string, max chars=250)
  The failure code. This will follow the api error code convention

- `failure_reason` (optional, string, max chars=250)
  The more descriptive failure reason.

- `error_json` (optional, string, max chars=1000)
  The failure details as error json.

