#nadia-sub-update
1 messages ยท Page 1 of 1 (latest)
hello @radiant urchin
thanks !
i remember having that conversation (is the customer.subscription.updated event sent when it's paid) & I think that i was not
do you have example event IDs for these by any chance?
Thanks
Taking a look
thanks
my colleague @blazing quail is following the case with me
we are looking for a solution to know when the plan update is made
& we want the update to be done only when the payment is ok
gotcha.
Give me a few as I'd need to reproduce this in order to make sure I'm on the same page
Appreciate your patience
still working on it
Hey @radiant urchin , no worries! Thanks for your help!
Thank you for waiting! ๐
So from my testing it does seem like we do still send invoice.paid event
Do you have a example subscription ID that I can look into see why that event wasn't fired?
@radiant urchin yes the invoice.paid event is fired by stripe, but the billing_reason:subscription_update seems to be removed in invoice.paid event, because we based our code for our product upgrade/downgrade to trigger the whole update process on our side
do you confirm that billing_reason:subscription_update is removed?
Ah gotcha
No it should still be there
It would be on the invoice object and not the subscription
but that is weird, we have a customer that asked for an upgrade (subscription update) we received the invoice.paid but no billing_reason:subscription_update :/
can you share the event ID for that invoice.paid event?
as evt_1KtBcwFxsE4pn4oaKcjTdccN is for customer.subscription.updated
yes sure
evt_1KnmGYFxsE4pn4oa3yRW6Msj for the invoice.paid event
the billing_reason is subscription_cyclle
here's when the customer changed to plan : evt_1KjJrOFxsE4pn4oaI8ZufYhs
I believe this would be expected behavior as it is part of a subscription schedule and the update happens as part of the phase change
https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason
but the thing is he upgraded before the next charge (12th april for him)
so that should fire the invoice.paid with billling_reason:subscription_updated
last year we've tested that feature and everything was working fine
ah interesting.
I'm not seeing any recent changes on our end regarding this.
that is weird, but in our case, when will the invoice.paid with billling_reason:subscription_updated be firedd by stripe?
@radiant urchin what do you advice us please ?
Hey @thorn panther! @radiant urchin had to step away so I'm stepping in here. Give me a moment to catch up.
@thorn panther do you have an example in the past where a customer.subscription.updated event was fired when a sub schedule was updated?
My understanding is this should only happen when the underlying sub is actually updated.
If the current phase isn't modified then it won't fire
yes : evt_1KtBcwFxsE4pn4oaKcjTdccN
but is it sent after a payment attempt ?
does it mean that its all good regarding the payment please ?
i dont want to grant access to my customer if its payment is declined for instance
No customer.subscription.updated won't necessarily fire after a payment attempt unless the status of the Sub changes. So if the Sub is past_due, and payment fails, and it remains past_due, then it won't fire.
An invoice.updated event will fire after every payment attempt though
okay ! thanks
so i can trust the customer.subscription.updated event right ?
to update my client rights
Yes, that should fire any time a Sub changes status
So if you want to only provision when the Sub is active then you can use that Event
okayyyy thanks a lot
so i need to catch the event & check the sub status
to be sure that everything is good
right ?
Yes that is the recommended way!
thanks a lot for your help ๐