[web] update webhook handler to include cancel_at (#32165)

* update webhook handler to include cancel_at
* guard against accidentally marking subscription event as canceled
* fix cancellation edgecase (reactivating a subscription that was canceled from Stripe Dashboard and also has a non-migration schedule)

GitOrigin-RevId: a872e91afa19094d4ae859293fc9669ea3e528f2
This commit is contained in:
Kristina
2026-03-25 13:06:06 +01:00
committed by Copybot
parent 942d0e7081
commit e4e4193d55

View File

@@ -19,6 +19,7 @@ export interface CustomerSubscriptionUpdatedWebhookEvent
// https://docs.stripe.com/api/events/object?api-version=2025-04-30.basil#event_object-data-previous_attributes
previous_attributes: {
cancel_at_period_end?: boolean // will only be present if the subscription was cancelled or reactivated
cancel_at?: number | null // will only be present if the subscription was cancelled or reactivated
items?: {
// will be present if the subscription was downgraded, upgraded, or renewed
data: [