How do I test subscriptions with the test clock?
A test clock lets you fast-forward time in test mode so you can see a subscription's renewals, trial ending, and dunning without waiting real days.
A test clock lets you fast-forward time in test mode so you can watch a subscription behave over weeks or months in seconds — its renewals, a trial ending, an instalment charging, and dunning on a failed charge — without waiting for real dates to arrive.
What to test
- A renewal — advance past the billing date and confirm the next charge and
SubscriptionChargedevent fire. - A trial ending — advance to the trial-end date and confirm the first charge (or auto-cancel) and the
SubscriptionTrialEndedevent. - Instalments — step through an annual instalment plan to see each monthly charge and
SubscriptionInstallmentCharged. - Dunning — with a failing test card, advance past a charge to see the retry and
SubscriptionPastDue.
How to use it
Create a subscription in test mode, then advance the test clock to the dates you want to exercise. All of this stays in test data — no real charges — so you can validate your webhook handling for the full subscription lifecycle before going live. See How do subscriptions and recurring billing work?