Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Use Simulations to simulate Billing objects


Use Simulations to simulate Billing objects

Learn how to simulate Billing objects through time.

Test your Billing integration and make sure it behaves as expected. By running a simulation, you can see how various Billing resources like subscriptions change over time. For example, you can see how your setup handles a payment failure for a quarterly renewal.

Run simulations in the sandbox assigned to that testing workflow. For new integrations, use a separate sandbox for continuous integration (CI) so its test clocks and related objects don’t interfere with local development. Learn more about choosing a testing environment.

Simulations use test clocks to control time. In the API and Dashboard, there are references to both. A simulation uses a clock to advance time, and track how things change.

Simulations let you:

  • Test complex simulations such as upgrading or changing plans mid-cycle.
  • Ensure your integration processes Billing lifecycle webhooks correctly.
  • Validate that your app handles trials correctly.
  • Build and test multi-phase subscription schedules.

How to use test clocks

Simulate subscriptions

Learn how to simulate subscriptions in a sandbox.

API and advanced usage

Learn advanced strategies for using test clocks in the Dashboard and API.

Last verified 2026-09-24

Is this helpful?