Project

General

Profile

Edit Copy Actions

Feature #11990

open

Support #11764: E-commerce pending tasks for nov 15 release

Feature #11610: Free Trial Integration in Company on boarding

Onboarding end to end completion.

Added by Divya Inapakurthi 1 day ago. Updated 1 day ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
11/04/2026
Due date:
% Done:

100%

Estimated time:

Add

Subtasks


Add

Related issues

Updated by Divya Inapakurthi 1 day ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

1. Tenant Self-Service Cancellation & Policy Governance
Multi-Tenant Configuration Architecture:
Analyzed and audited the inheritance pattern: Platform default (billingSettings.allowTenantSelfCancellation) vs per-tenant explicit override (company.saasBilling.allowTenantSelfCancellation).
Ensured new tenants default to null so they inherit global platform updates dynamically without hardcoded drift.
SuperAdmin API & UI Control:
Endpoint PATCH /superadmin/billing/tenants/:companyId/self-cancellation (billing.controller.js) to toggle cancellation permissions per store.
SuperAdmin Platform Billing Settings screen (PlatformBillingSettingsPage.tsx) allowing admins to enable or disable in-app tenant self-service cancellation platform-wide.
Tenant In-App Hub (PlanUsagePage.tsx):
Built policy-aware UI: When allowed, tenants can schedule cancellation at period end and fill out exit/churn reasons; when blocked, it surfaces support contacts.
Added subscription resume/un-cancel action to reverse pending cancellation.
2. Card Processing Fee Surcharge at Stripe Checkout
Stripe Tax Rate Integration:
Implemented getOrCreateCardFeeTaxRate and syncCardFeeToStripeSubscription in tenantBilling.service.js.
Automatically creates or reuses exclusive Stripe TaxRate objects for credit card processing fees (creditCardTax / cardProcessingFeePercent).
Propagates processing fee updates directly to active/trialing Stripe subscriptions.
Unit Testing:
Added and passed cardFeeSurchargeCheckout.test.js (8 passing tests).
3. Trial Onboarding Disclosures, PDF & Email Receipts
EJS Email Templates:
Enhanced tenantBillingInvoiceReceipt.ejs to render trial disclosures, scheduled first-charge dates, recurring amounts, and cancellation instructions.
Updated onboarding and lifecycle notification templates:
onboardingCompanyReady.ejs
onboardingPaymentLink.ejs
tenantBillingPaymentFailed.ejs
tenantSubscriptionNotice.ejs
Branded PDF Invoices:
Enhanced billingReceiptPdf.js to dynamically support platform/company branding and logos.
Unit Testing:
Created trialOnboardingTemplates.test.js and companyLogoBillingPdf.test.js.
4. Tenant Billing Context & Action History Deduplication
Billing Period & Double-Extension Bug Fixes:
Fixed resolveBillingContext to prevent ReferenceError crashes on trialing tenants and cancelAtPeriodEnd accounts.
Guarded against renewal double-extension where planExpiresAt previously risked advancing further than the billing cycle interval.
History Deduplication:
Refactored buildTenantActionHistory in tenantBilling.service.js to deduplicate redundant "Auto renewal completed" entries when a detailed "Subscription renewed" invoice event already exists for that transaction.
Added unit test suite in tenantActionHistory.test.js.
5. Frontend Subscription Hubs (evergreen_pos_fe & nexZentekSubscription_fe)
Tenant POS Frontend (PlanUsagePage.tsx):
Added usage metrics, meter progress bars, upgrade options, top-up pack purchase flows, and expiry warning banners via PlanExpiryBanner.tsx.
SuperAdmin Subscription Frontend:
Updated CompanyDetailsPage.tsx and SaasPlansPage.tsx with company-level billing management and card fee configurations.

Edit Copy Actions

Also available in: Atom PDF