Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Create a test clock


Create a test clock Test helper

POST / v1 / test_helpers / test_clocks

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

Parameters

  • frozen _ time timestamp Required The initial frozen time for this test clock.
  • name string The name for this test clock. The maximum length is 300 characters.

More parameters

  • customer string

Returns

The newly created TestClock object is returned upon success. Otherwise, this call raises an error.

Response

{ "id": "clock_1Mr3I22eZvKYlo2Ck0rgMqd7", "object": "test_helpers.test_clock", "created": 1680112806, "deletes_after": 1680717606, "frozen_time": 1577836800, "livemode": false, "name": null, "status": "ready"}

Retrieve a test clock Test helper

GET / v1 / test_helpers / test_clocks /:id

Retrieves a test clock.

Parameters

No parameters.

Returns

Returns the TestClock object. Otherwise, this call raises an error.

Response

{ "id": "clock_1Mr3I22eZvKYlo2Ck0rgMqd7", "object": "test_helpers.test_clock", "created": 1680112806, "deletes_after": 1680717606, "frozen_time": 1577836800, "livemode": false, "name": null, "status": "ready"}

List all test clocks Test helper

GET / v1 / test_helpers / test_clocks

Returns a list of your test clocks.

Parameters

No parameters.

More parameters

  • ending _ before string
  • limit integer
  • starting _ after string

Returns

A dictionary with a data property that contains an array of up to limit test clocks, starting after starting_after. Each entry in the array is a separate test clock object. If no more test clocks are available, the resulting array will be empty.

Response

Last verified 2026-09-24

Is this helpful?