The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Add temporary handling for webhook requests with version=latest
Kiran K85e885754bba
diff --git a/apps/web/app/(ee)/api/stripe/integration/webhook/route.ts b/apps/web/app/(ee)/api/stripe/integration/webhook/route.tsindex 3647f1f6da..5f48243f36 100644--- a/apps/web/app/(ee)/api/stripe/integration/webhook/route.ts+++ b/apps/web/app/(ee)/api/stripe/integration/webhook/route.ts@@ -19,6 +19,14 @@ const relevantEvents = new Set([// POST /api/stripe/integration/webhook – listen to Stripe webhooks (for Stripe Integration)export const POST = withAxiom(async (req: Request) => {+ // Skip the request with query params version=latest+ // We'll remove this once we're ready to go live+ if (req.url.includes("version=latest")) {+ return new Response(+ "Ignore the request from the new webhook with ?version=latest",+ );+ }+const buf = await req.text();const { livemode } = JSON.parse(buf);