subscription resource and report access-state changes on subscriptions to your app’s pricing plans.
Every event requires
read:self. Each arrives in the envelope with the resource in data. A buyer who cancels keeps access until the end of the paid period.
The money and the access state are separate events. A subscription’s initial charge emits both app.payment.succeeded with billing_reason: "subscription_initial" and app.subscription.activated.
Subscription resource
data.object is "subscription" for both events.
Branch on
cancel_at_period_end, not on status. status is "active" on both events, so a handler switching on status sees no change when a buyer cancels.
Examples
app.subscription.activated
app.subscription.cancel_at_period_end_changed
status stays "active" and the buyer keeps access until the period ends. plan.uuid is null on this event.
Reconciling
Use each event as the trigger to re-readGET /apps/{appUuid}/subscription-status, which returns the current period end. The same transition repeated on one subscription reuses the event id, so deduplicate on it. See Repeated subscription state transitions.