#cyborg-checkout-subscription

1 messages · Page 1 of 1 (latest)

remote rose
#

Hi there, there are a variety of events you can use but the easiest imo is going to be checkout.session.completed for when a subscription first starts, and then customer.subscription.updated for when a subscription status changes (like it goes from active --> inactive or to canceled)

terse oasis
#

ah, cool. What about invoice.paidfor subscrption start?

remote rose
#

That is fine too but it will fire for every renewal as well

terse oasis
#

ah, got it. I guess i can use invoice.paid if I want to store invoice data in my db.

remote rose
#

Yeah, you can also use customer.subscription.updated and then retrieve the latest_invoice after the event hits your handler

#

There are a variety of ways to go here — a lot of it is personal preference.

terse oasis
#

awesome. Thanks a lot for your help. Really appreciate it.