Scheduling infrastructure for absolutely everyone.
Add new response if request contains account id (#2629)
Joe Au-Yeungeea40c69f7a5
diff --git a/apps/web/ee/pages/api/integrations/stripepayment/webhook.ts b/apps/web/ee/pages/api/integrations/stripepayment/webhook.tsindex 1b29a7e8849..7bddc5b3391 100644--- a/apps/web/ee/pages/api/integrations/stripepayment/webhook.ts+++ b/apps/web/ee/pages/api/integrations/stripepayment/webhook.ts@@ -174,6 +174,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)const event = stripe.webhooks.constructEvent(payload, sig, process.env.STRIPE_WEBHOOK_SECRET);+ if (event.account) {+ throw new HttpCode({ statusCode: 202, message: "Incoming connected account" });+ }+const handler = webhookHandlers[event.type];if (handler) {await handler(event);