#Becca
1 messages ยท Page 1 of 1 (latest)
HI there, if you want to get notified when an invoice is paid, you should listen to invoce.paid events
use case here is wanting to show a note on our subscriptions page if the user has an invoice they need to do something with, so was thinking invoice.updated status = paid marks this flag as false and open/uncollectible marks it as true
(like if a card is valid for subscription start but then at a later point for a renewal it's expired)
Your use case looks like more about subscription. Perhaps you want to listen to subscription events instead? (i.e., customer.subscription.updated)
I am using customer.subscription.[created|deleted|updated] for managing what a user is currently subscribed to in our system, but thought invoice.updated would be more appropriate for this billing issue flag hrmm
(but yes, hosted checkout + subscriptions)
OK, to get notified about billing problems, you should listen to these events https://stripe.com/docs/billing/subscriptions/webhooks#additional-action
hrmm. do those all not fire an invoice.updated as well? I assumed they would and thus could just listen to the 1 event instead of 4? (the 3 listed there for failure + invoice.paid)
lol I was gonna say that makes sense but deleted ๐
Let me do a quick test to verify.
appreciate it!
Correction -> you'll get a invoice.updated event when payment fails because the invoice's attempt_count property changes.
ah
But you'll have hard time figuring out what triggers this invoice.updated event.
So my suggestion is to listen to the dedicated events instead of just invoice.updated
hmm ok bummer. since I just want to show a banner on our page basically telling the user "click here to go to the billing portal to resolve an issue" I was hoping listening just to 1 event would suffice
unfortunate
I wish there was documentation that compared events like these. the subscription webhooks page makes it seem like invoice.updated is perfectly acceptable so it's confusing reconciling that with guidance here (and makes me concerned about all the other things I've taken from the documentation lol)
๐ taking over, and I think invoice.updated could mean a lot many other things, link a small property changed, it doesn't necessary require your customer to do smth
right, I guess I didn't mention that I was going to use the event to look at the status and if open/uncollectible enable the flag and if open disable it.