Project

General

Profile

Edit Copy Actions

Feature #9370

open

Update Subscriptions both service and product to support tenet based flow frontend and backend

Added by Divya Inapakurthi about 1 month ago. Updated 26 days ago.

Status:
In Progress
Priority:
Normal
Target version:
-
Start date:
07/03/2026
Due date:
07/09/2026 (26 days late)
% Done:

100%

Estimated time:
(Total: 28:00 h)
Spent time:
11:00 h (Total: 27:00 h)

Add

Subtasks 4 (4 open0 closed)

Feature #9560: Service Subscription tenet converting support with Pavan Help ResolvedDivya Inapakurthi07/03/202607/06/2026

Delete link to subtaskActions
Feature #9574: Fixing and resolving issues after converting to subscription tenet end to end for break less flow ResolvedDivya Inapakurthi07/06/202607/06/2026

Delete link to subtaskActions
Feature #9576: Product Subscription converting to tenet support ResolvedDivya Inapakurthi07/06/202607/07/2026

Delete link to subtaskActions
Feature #9603: End to End flow issues fixing in SubscriptionNewDivya Inapakurthi07/07/202607/09/2026

Delete link to subtaskActions

Add

Related issues 1 (1 open0 closed)

Related to Feature #9306: Testing Subscription flow in tenent frontend ResolvedDivya Inapakurthi07/01/202607/02/2026

Delete relationActions
Actions #1

Updated by Divya Inapakurthi about 1 month ago

  • Parent task deleted (#9306)
Actions #2

Updated by Divya Inapakurthi about 1 month ago

  • Parent task set to #9306
Actions #3

Updated by Divya Inapakurthi about 1 month ago

  • Parent task deleted (#9306)
Actions #4

Updated by Divya Inapakurthi about 1 month ago

  • Related to Feature #9306: Testing Subscription flow in tenent frontend added
Actions #5

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
Actions #6

Updated by Divya Inapakurthi about 1 month ago

  • Status changed from New to In Progress
Actions #7

Updated by Divya Inapakurthi about 1 month ago

  • Due date changed from 07/02/2026 to 07/03/2026
Actions #8

Updated by Divya Inapakurthi about 1 month ago

  • Subtask #9535 added
Actions #9

Updated by Divya Inapakurthi about 1 month ago

  • Subtask deleted (#9535)

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

Actions #11

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

Actions #13

Updated by Divya Inapakurthi about 1 month ago

  • Subtask #9560 added
Actions #14

Updated by Divya Inapakurthi 29 days ago

  • Subtask #9574 added
Actions #15

Updated by Divya Inapakurthi 29 days ago

  • Subtask #9576 added
Actions #16

Updated by Divya Inapakurthi 28 days ago

  • Subtask #9603 added
Edit Copy Actions

Also available in: Atom PDF