#Ipares-Sub-events
1 messages · Page 1 of 1 (latest)
Hi there! You want to rely on the status of the Subscription to provision (https://stripe.com/docs/api/subscriptions/object#subscription_object-status). So you don't want to listen for customer.subscription.created since that Sub will be incomplete until successful payment. Then the customer.subscription.updated event will fire and the sub will move to active and now you provision. Yes, customer.subscription.deleted will fire when the Sub is canceled and you can rely on that to remove access.
Great, thanks! Is it possible to receive a customer.subscription.updated with status != active? If so, will a customer.subscription.deleted also be triggered, or should I remove the access in the update too if the subscription is not active?
Yes your Sub could move to past_due
This is dependent on your settings mostly
Also it can move to incomplete.expired after creation if it never becomes active
Okay. So in this basic case, when receiving an update it will be better to check the status and if it's not active revoke the access to the website, correct?
Most likely yes. But that mostly depends on your business and when you want to provision access!
Some folks allow for access while a sub is in past_due
But then remove access once the sub is actually canceled.
Perfect, thank you!