Feature #9370
openUpdate Subscriptions both service and product to support tenet based flow frontend and backend
100%
Updated by Divya Inapakurthi about 1 month ago
- Related to Feature #9306: Testing Subscription flow in tenent frontend added
Updated by Divya Inapakurthi about 1 month ago
- Subject changed from Update Subscriptions both service and product to support tenet based flow to Update Subscriptions both service and product to support tenet based flow frontend and backend
Updated by Divya Inapakurthi about 1 month ago
- Status changed from New to In Progress
Updated by Divya Inapakurthi about 1 month ago
- Due date changed from 07/02/2026 to 07/03/2026
Updated by Divya Inapakurthi about 1 month ago
- Due date changed from 07/02/2026 to 07/03/2026
- % Done changed from 0 to 100
Work Done – 02-07-2026¶
1. Fixed: Subscription Results Page Redirecting to Login¶
After a customer completes Stripe checkout, the success URL
(/subscription/results?session_id=...) was redirecting to the login page
instead of showing the confirmation screen.
Root Cause:
- The wildcard route () in mainRouter.tsx was catching /subscription/results
and prepending the tenant slug (e.g. /evergreen/subscription/results)
- This slug-prefixed path falls inside the /:slug/ tenant shell which requires
authentication, causing unauthenticated customers to be redirected to login
Fix Applied (Frontend):
- Added /subscription/results as a root-level public route in mainRouter.tsx
alongside other public routes like /OrderSuccess and /Unsuccess
- SubscriptionResultPage now uses publicApi (no auth required) to fetch
Stripe session data
- Both /subscription/results and /evergreen/subscription/results work correctly
2. Fixed: Infinite Polling Loop on Subscription Results Page¶
The results page was continuously polling the backend API
(/api/v1/subscripition/session/:sessionId) without ever completing.
Root Cause:
- The webhook handler set contract.initialJobsScheduled = true when creating jobs
- When the fallback job creator ran, the atomic lock detected jobs were already
scheduled and returned false
- autojobsCreated remained false → completed stayed false → frontend kept polling
Fix Applied (Backend):
- When the atomic lock detects jobs are already scheduled, the invoice is now
marked jobCreated = true in the database and returns true (success)
- This correctly sets autojobsCreated = true → completed = true → polling stops
3. Identified: Stripe Account Key Mismatch¶
After switching Stripe accounts, no webhook events were being forwarded.
Root Cause:
- STRIPE_SECRET_KEY_NUS_ECOM (used for service subscriptions) still had the
old account's secret key while Stripe CLI was authenticated to the new account
- Checkout sessions were being created against the old account
Action Required:
- Update STRIPE_SECRET_KEY, STRIPE_SECRET_KEY_NUS, STRIPE_SECRET_KEY_NUS_ECOM
in config.env with the new account's sk_test_51SSZpJQa2b5DFqbd... key
- Update VITE_STRIPE_PK in frontend .env with the new publishable key
- Webhook secrets (whsec_400585c...) already match — no change needed there
Updated by Divya Inapakurthi about 1 month ago
- Due date changed from 07/03/2026 to 07/06/2026
Updated by Divya Inapakurthi about 1 month ago
testing end to end service subscription for final review on tenet changes