#mayhul-subscriptions-events

1 messages · Page 1 of 1 (latest)

dry pecanBOT
marble forum
#

I would recommend listening to all those Events really personally

warped flax
#

Well it seems like when someone pays for a subscription using a card, both the invoice.paid and sub.updated event get fired at around the same time. If we listen to both, then our handling logic would get called twice at the same time, correct?

marble forum
#

yeah you would handle this in your database/code I would say

#

but I think it's much better to use invoice.paid

#

mayhul-subscriptions-events

warped flax
#

ok so your recommendation is to listen to all of those events & just make sure that our handling code is resilient to being called multiple times redundantly?

marble forum
#

yes that's what I would do if I were you

#

because customer.subscription.updated is useful for other changes too in general

dry pecanBOT
warped flax
#

So if we had actions that we only wanted to do once (such as sending a notification to a user), should we take those actions in invoice.paid or customer.subscription.updated?

sick charm
#

Hi, stepping in and catching up.