Skip to content

Test Clocks ​

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.

Endpoints ​

Create a test clock ​

  • POST /v1/test_helpers/test_clocks

Retrieve a test clock ​

  • GET /v1/test_helpers/test_clocks/:id

List all test clocks ​

  • GET /v1/test_helpers/test_clocks

Delete a test clock ​

  • DELETE /v1/test_helpers/test_clocks/:id

Advance a test clock ​

  • POST /v1/test_helpers/test_clocks/:id/advance

Events ​

  • test_helpers.test_clock.advancing Occurs whenever a test clock starts advancing.

  • test_helpers.test_clock.created Occurs whenever a test clock is created.

  • test_helpers.test_clock.deleted Occurs whenever a test clock is deleted.

  • test_helpers.test_clock.internal_failure Occurs whenever a test clock fails to advance its frozen time.

  • test_helpers.test_clock.ready Occurs whenever a test clock transitions to a ready status.

Stripe API Reference - Self-contained docs reference, refreshed 2026-05-18