#simonecervini

1 messages · Page 1 of 1 (latest)

slow kelpBOT
timber kayak
#

the order is not guranteed and can come in any order

#

overall the correct way to build this I would think would be to use the checkout.session.completed event instead, and do whatever "post-the-customer-using-Checkout" actions you need (like upgrading a plan) at that point. Otherwise you get a bunch of events for customer.subscription.* that happen internal to Checkout being used and it might cause confusion.

untold coral
#

Thank you, that is very useful information.

So I could use checkout.session.completed to handle the free -> premium switch with one call and then use customer.subscription.deleted just to handle the cancellation and any failed payments that end up with status = canceled after a while.

And this way I can completely eliminate customer.subscription.created and customer.subscription.updated which might be inconvenient to handle with the unpredictable order.

Does this sound like a correct method?

timber kayak
#

yep