#Robert-Ibracadabra-invoice webhooks

1 messages ยท Page 1 of 1 (latest)

ivory rain
#

๐Ÿ‘‹ happy to help

dry pond
#

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

gusty matrix
#

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

dry pond
#

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.

dry pond
#

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

gusty matrix
#

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 ๐Ÿ˜ฆ

dry pond
#

I linked one above

gusty matrix
#

Yes i checked them now but its not stated clearly there

#

Ok then tu summarize you suggest: invoice.paid and customer.subscription.updated?

dry pond
#

yes

gusty matrix
#

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?

dry pond
#

sure