#classicbrownboy
1 messages · Page 1 of 1 (latest)
Hi 👋 you can use Test Clocks for this:
https://stripe.com/docs/billing/testing/test-clocks
They allow you to create Subscriptions inside of small sandboxes where you can force time to move forward, allowing you to quickly move a Subscription through it's entire lifecycle and see exactly how it will behave based on your settings.
Awesome, I will take a look at that. By chance, do you know after how much time before the next cycle that the next invoice is generated in stripe in draft mode?
is it only generated the day of the next cycle starting or is it generated a certain amount of days before the next cycle start
The next Invoice will be generated when the Subscription moves to its next billing period, you can check when that will be by checking the current_period_end field on the Subscription:
https://stripe.com/docs/api/subscriptions/object#subscription_object-current_period_end
You can get webhook events delivered to you indicating an Invoice will be genreated in X number of days (options are 3, 7, 15 I believe, but would need to double check) though if that is something that would be beneficial.
one more question: is there a safe way to modify subscriptions to ensure that there's no possible way that old invoices tied to that subscription is effected and nothing but future invoices are effected?
and ensure customers wont get auto-billed
If the Invoice has already been created and finalized, then you can't make changes to the Subscription that will impact those previous Invoices. Those changes will only impact newly created Invoices.
what about draft mode invoices
Customer being automatically charged is controlled by the collection_method parameter:
https://stripe.com/docs/api/subscriptions/update#update_subscription-collection_method
I'm not certain, but I believe the draft Invoice won't be impacted by changes to the Subscription, depending on the changes. Cancelling it may impact the Invoice. I would recommend using a Test Clock to simulate the scenario you have in mind, and see how that runs based on the various settings in your account.