#polar18_webhooks

1 messages ¡ Page 1 of 1 (latest)

severe groveBOT
#

👋 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/1222606683730346124

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

hard ironBOT
#

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.

grand hatch
#

I do see that I could use handling across invoice.payment_failed and invoice.payment_succeeded when the billing reason is subscription_cycle, however wanted to see if there was a better way just using the subscription/subscription schedule objects

hard ironBOT
tough wing
#

Hi, can you clarify what you mean. by 'confirm whether an update was at the billing cycle switch'? The subscription_cycle on the invoice means that it the invoice was created to due a subscription's cycle.

grand hatch
#

Yeah, I'm looking specifically at a subscription.update event and seeing if there is a way to determine whether that update was from a scheduled update at the subscription schedule

#

I can do it separately across the invoice events, but was trying to see if consolidating was possible

tough wing
#

I think the best way here would be to look at the previous_attributes to determine what changes were made.

grand hatch
#

That wouldn't differentiate a susbcription cycle change from another subscription change though, would it? There's nothing necessarily different about previous_attributes between those two that I know of

tough wing
#

Yeah, the subscription events would not have subscription_cycle like you're looking for.

grand hatch
#

Ok, sounds like using the invoice events is the best path forward

#

Thanks for the advice

tough wing
#

Sure!