#nadia-sub-update

1 messages ยท Page 1 of 1 (latest)

radiant urchin
#

Hello ๐Ÿ‘‹
I'm not sure. Let me take a look

thorn panther
#

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

radiant urchin
#

do you have example event IDs for these by any chance?

thorn panther
#

yes

#

evt_1KtBcwFxsE4pn4oaKcjTdccN

radiant urchin
#

Thanks
Taking a look

thorn panther
#

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

radiant urchin
#

gotcha.
Give me a few as I'd need to reproduce this in order to make sure I'm on the same page

radiant urchin
#

Appreciate your patience
still working on it

blazing quail
#

Hey @radiant urchin , no worries! Thanks for your help!

radiant urchin
#

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?

blazing quail
#

@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?

radiant urchin
#

Ah gotcha
No it should still be there
It would be on the invoice object and not the subscription

blazing quail
#

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 :/

radiant urchin
#

can you share the event ID for that invoice.paid event?

#

as evt_1KtBcwFxsE4pn4oaKcjTdccN is for customer.subscription.updated

blazing quail
#

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

radiant urchin
blazing quail
#

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

radiant urchin
#

ah interesting.
I'm not seeing any recent changes on our end regarding this.

blazing quail
#

that is weird, but in our case, when will the invoice.paid with billling_reason:subscription_updated be firedd by stripe?

thorn panther
#

@radiant urchin what do you advice us please ?

wind bison
#

Hey @thorn panther! @radiant urchin had to step away so I'm stepping in here. Give me a moment to catch up.

thorn panther
#

hi @wind bison

#

thanks !

wind bison
#

@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

thorn panther
#

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

wind bison
#

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

thorn panther
#

okay ! thanks
so i can trust the customer.subscription.updated event right ?

#

to update my client rights

wind bison
#

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

thorn panther
#

okayyyy thanks a lot
so i need to catch the event & check the sub status

#

to be sure that everything is good

#

right ?

wind bison
#

Yes that is the recommended way!

thorn panther
#

thanks a lot for your help ๐Ÿ™