Use Simulations to simulate Billing objects

1 min read Original article ↗

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.

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