#Robert-Ibracadabra-invoice webhooks
1 messages ยท Page 1 of 1 (latest)
I'd use invoice.paid for tracking when the payment is made and extending access to your product, and customer.subscription.updated to know when the subscription has been cancelled etc(depends on your settings) after all invoice attempts are exhausted
I use invoice.payment_succeeded
Isnt that the same as invoice.paid?
but in case of success?
And in case of failed
I need to wait for retry attempts
to become null
invoice.paid happens also if the invoice amount was $0 , while invoice.payment_succeeded only happens when there's an actual charge. So it's better to use.
yeah that 's why I didn't mention using invoice.payment_failed
that's why I said it's easier to just wait for the customer.subscription.updated event when the subscription finally cancels after all the retries
so to summarize you suggest that I use the following:
invoice.paid
and customer.subscription.updated?
I couldn't find a clear tutorial stating which events are the correct ones to handle all use cases ๐ฆ
I linked one above
Yes i checked them now but its not stated clearly there
Ok then tu summarize you suggest: invoice.paid and customer.subscription.updated?
yes
One small thing I would like to ask:
So I will receive the subscription object when this events occur
with success
or similar status
If the status is correct in both cases
I presume I can update my firestore records accordingly?
sure