#beastboy_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1276274688963776512
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- beastboy_subscription-refund, 2 days ago, 9 messages
- beastboy_subscription-upgrade, 2 days ago, 17 messages
Hi ๐ there isn't a way to be notified about a Subscription getting ready to move to a new billing period (aside from invoice.upcoming).
You can listen for invoice.created that is triggered when the Subscription moves to the new billing and creates a draft Invoice, but I don't think you'll be able to make the changes you want to that draft Invoice (though I may be mistaken or that may depend on how exactly you structured your Subscriptions). You would need to add logic to make sure you filter out the first Invoice for a Subscription too.
The other thing that is coming to mind is to use a Subscription Schedule to schedule the change you're describing to happen when the Subscription moves to the next billing period, and then you can remove that Subscription Schedule if you hear from your customer in time.
https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#changing-subscriptions
Any time! I dropped a link to the use case that I think most closely matches the flow you'll need to use as a starting point.
Sure
this is a new feature to affect existing customers, so I will need to create this sub schedule for 1000+ active subscriptions. I guess I just have to write a script for this?
does stripe rate limit / thorttle requests?
Yeah, a script would be the way to go, and there are rate limits to be wary of. We discuss those in more detail here:
https://docs.stripe.com/rate-limits
You can typically make 100 requests per second, though that doc does a better job of breaking down those limits.