#heyhey-subscriptions
1 messages · Page 1 of 1 (latest)
Trying to test the cycle of a subscription
All subscriptions is on an monthly interval
And i dont want to wait 1 month to see if it works haha
unfortunately there aren't really great options for this today!
basically there's two things :
- you can create the subscription with
trial_endset to about 5/10 minutes in the future. When the trial ends it creates all the same events as a recurring invoice. https://stripe.com/docs/billing/testing#trials - we have a beta of a solution for this which more accurately does what you want, but you'd have to get access to it first https://stripe.com/docs/billing/testing/test_clocks
How does these test clocks work
not sure how I can answer that in more detail than the docs I linked do.
What does it mean to set a frozen time
it's the base time. So normally you create a subscription and all the dates involved with it are based on today, the time you made the API request. The frozen time lets you anchor the tests to a specific time instead
I have already created customers though, how would i set it to frozen time
it would be easiest to just do a fresh test. It's a bit of a moot point if you don't have access to that feature anyway
I have another question
const deleted = await stripe.subscriptions.del(
getSub.subscriptionId
)
Will this send customer.subscription.deleted event from webhook?
yep, it will!