Create a test clock object via the Stripe API in test mode; receive a test_clock ID that you attach to customers created in that simulated time environment.
Create a Customer with the test_clock field set to your test clock ID; all subscriptions, invoices, and events created under this customer will respect the simulated time.
Create a Subscription on this customer; the first invoice will be generated at the simulated 'now' time of the test clock.
Advance the test clock by calling the advance endpoint with a new frozen_time timestamp to jump forward in time; Stripe will process all subscription renewals, invoice generation, and dunning events that would occur in that interval.
Inspect the resulting Invoice and Subscription objects to verify your webhook handlers processed renewal, past_due, and canceled events correctly.
Delete the test clock when done; all associated customers and subscriptions are cleaned up automatically.
Known gotchas
Test clocks only work in Stripe test mode; they have no effect in live mode and cannot be used to accelerate real subscription billing.
You cannot advance a test clock backwards; if you need to test an earlier scenario, create a new test clock.
Test clock advancement is asynchronous; poll the test clock object's status field or listen for the test_helpers.test_clock.ready webhook before inspecting results.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp