#harryyy27_api
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/1294277139650187264
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
hihi
yes current_period_end would make sense for this.
Does current_period_end for the next billing cycle come up in any of the events that occur during a subscription payment?
or would i need to retreive it?
current_period_end is on the Subscription object. So all customer.subscription.* events will contain that field.
okay so when a customer.subscription.updated event fires during the subscription payment, would the "curent_period_end" for the next billing cycle appear?
sure, since it will contain a Subscription in the payload
hmm okay, lemme try it
are you sure it wont be for the current period the customer is actually making a payment for as the event is firing haa?
well, it depends when exactly you listen for the customer.subscription.updated event. but at least it will always contain current_period_end.
you could also listen to the invoice.paid event and check the period_end.
I recommend doing some tests in testmode for this. and you can use Test Clock to help you: https://docs.stripe.com/billing/testing/test-clocks
yeah I'll give it a whirl now