Hey @vic-a563d7 !
This is expected in the case of billing issues. If a subscriber with an active subscription encounters a billing issue, RevenueCat will immediately dispatch a BILLING_ISSUE
event and a CANCELLATION
event with a cancel_reason
of BILLING_ERROR
.
If you do not have grace periods enabled, you’ll immediately receive an EXPIRATION
webhook and the subscriber’s entitlements will be revoked. If you do have grace periods enabled, the subscriber will retain entitlements as the app store retries the subscriber’s billing method. At the end of the grace period, if billing has not been successful, an EXPIRATION
event will be sent and entitlements will be revoked. If billing succeeds at any point during the grace period, you’ll receive a RENEWAL
event and entitlements won’t be revoked. (This RENEWAL
event may show up before the billing issue in the Customer History timeline. Be sure to check the timestamps on the event pages.) It’s important to note that the BILLING_ISSUE
, CANCELLATION
, and EXPIRATION
(if no grace period is involved) webhooks are dispatched in order at the same time, so it is unlikely but possible to receive these events in a different order than described here due to network irregularities.
While similar, there is a difference between cancellation and expiration events. Cancellation events happen when a subscription or non-renewing purchase has been cancelled or refunded. See cancellation reasons for more details. Expiration events in most cases come after the cancellation event and the cancellation can be seen as a trigger for these expiration events to occur.
Mainly, which event tells me to remove the extra paid features for the user?
According to the docs, sounds like EXPIRATION is the only one to remove user functionality and not CANCELLATION? Would CANCELLATION ever come alone with nothing after?
Cancellation events could come without an expiration immediately in a couple of cases but to keep things simpler on your end I would recommend waiting for the expiration event to make sure that you revoke the features and that can be the designation that a user is truly expired.
Let me know if that helps!