Merge pull request #28847 from overleaf/kh-verify-trials

[web] ensure trials work for Stripe custom checkout

GitOrigin-RevId: 9918e768502d50d61cf1a01dfc244fc57411ed35
This commit is contained in:
Liangjun Song
2025-10-09 08:34:51 +01:00
committed by Copybot
parent fd9be80bb3
commit a79171479b

View File

@@ -77,6 +77,34 @@ export type PaymentIntentPaymentFailedWebhookEvent = {
request: Stripe.Event.Request
}
export type SetupIntentSetupFailedWebhookEvent = {
type: 'setup_intent.setup_failed'
data: {
object: Stripe.SetupIntent & {
metadata: {
userId?: string
isTrial?: string
checkoutSource?: 'hosted-checkout' | 'elements-checkout' | undefined
}
}
}
request: Stripe.Event.Request
}
export type SetupIntentSucceededWebhookEvent = {
type: 'setup_intent.succeeded'
data: {
object: Stripe.SetupIntent & {
metadata: {
userId?: string
isTrial?: string
checkoutSource?: 'hosted-checkout' | 'elements-checkout' | undefined
}
}
}
request: Stripe.Event.Request
}
export type InvoiceVoidedWebhookEvent = {
type: 'invoice.voided'
data: {
@@ -122,6 +150,8 @@ export type WebhookEvent =
| InvoicePaidWebhookEvent
| InvoiceVoidedWebhookEvent
| PaymentIntentPaymentFailedWebhookEvent
| SetupIntentSetupFailedWebhookEvent
| SetupIntentSucceededWebhookEvent
| InvoiceOverdueWebhookEvent
| CheckoutSessionCompletedWebhookEvent
| CustomerCreatedWebhookEvent