From 05676a5f86074a75bd8af794c29fb1044d214611 Mon Sep 17 00:00:00 2001 From: "Claude (Chronicler #57)" Date: Fri, 3 Apr 2026 16:54:42 +0000 Subject: [PATCH] fix: move webhook to /webhooks/stripe to avoid route conflict ISSUE: Mounting at /stripe/webhook conflicts with /stripe mount Both mounts match the webhook URL, JSON parser wins FIX: Changed webhook mount from /stripe/webhook to /webhooks/stripe Now completely separate from /stripe checkout mount NEW WEBHOOK URL: https://discord-bot.firefrostgaming.com/webhooks/stripe/webhook UPDATE STRIPE DASHBOARD TO: https://discord-bot.firefrostgaming.com/webhooks/stripe/webhook Signed-off-by: Claude (Chronicler #57) --- services/arbiter-3.0/src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/arbiter-3.0/src/index.js b/services/arbiter-3.0/src/index.js index 5cc03d7..6feacd8 100644 --- a/services/arbiter-3.0/src/index.js +++ b/services/arbiter-3.0/src/index.js @@ -39,10 +39,10 @@ app.set('view engine', 'ejs'); app.set('views', __dirname + '/views'); // CRITICAL: Stripe webhook needs raw body BEFORE express.json() middleware -// This route must be registered before any body parsers -app.use('/stripe/webhook', stripeRoutes); +// Mounted at /webhooks/stripe to avoid conflict with /stripe checkout mount +app.use('/webhooks/stripe', stripeRoutes); -// Body parsing middleware (comes AFTER stripe webhook route) +// Body parsing middleware (comes AFTER webhook route) app.use(express.json()); app.use(express.urlencoded({ extended: true }));