#harryyy27_api

1 messages ¡ Page 1 of 1 (latest)

runic bladeBOT
#

👋 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.

amber roost
#

hi there!

small obsidian
#

hihi

amber roost
#

yes current_period_end would make sense for this.

small obsidian
#

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?

amber roost
#

current_period_end is on the Subscription object. So all customer.subscription.* events will contain that field.

small obsidian
#

okay so when a customer.subscription.updated event fires during the subscription payment, would the "curent_period_end" for the next billing cycle appear?

amber roost
#

sure, since it will contain a Subscription in the payload

small obsidian
#

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?

amber roost
#

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.

small obsidian
#

yeah I'll give it a whirl now

runic bladeBOT