---
title: "Create a test clock"
method: POST
path: "/v1/test_helpers/test_clocks"
---

# Create a test clock

`POST /v1/test_helpers/test_clocks`

Creates a new test clock that can be attached to new customers and quotes.

## Response `200`

Successful response.

- TestHelpersTestClock — A test clock enables deterministic control over objects in testmode. With a test clock, you can create objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.
  - `created` integer, required — Time at which the object was created. Measured in seconds since the Unix epoch.
  - `deletes_after` integer, required — Time at which this clock is scheduled to auto delete.
  - `frozen_time` integer, required — Time at which all objects belonging to this clock are frozen.
  - `id` string, required — Unique identifier for the object.
  - `livemode` boolean, required — If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
  - `name` string, nullable — The custom name supplied at creation.
  - `object` 'test_helpers.test_clock', required — String representing the object's type. Objects of the same type share the same value.
  - `status` 'advancing' | 'internal_failure' | 'ready', required — The status of the Test Clock.
  - `status_details` BillingClocksResourceStatusDetailsStatusDetails, required
    - `advancing` BillingClocksResourceStatusDetailsAdvancingStatusDetails
      - `target_frozen_time` integer, required — The `frozen_time` that the Test Clock is advancing towards.

## Other responses

- `default` — Error response.

---

[API](https://skmtc.net/stripe/apis/spec3.md) · [All operations](https://skmtc.net/stripe/apis/spec3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stripe/spec3/revisions/3653ad45bbec/schema)
