Project

General

Profile

Edit Copy Actions

Feature #11617

closed

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

Feature #11610: Free Trial Integration in Company on boarding

Task 5: Operational Access & Read-Only / Grace Enforcement

Added by Divya Inapakurthi 11 days ago. Updated 2 days ago.

Status:
Closed
Priority:
Normal
Start date:
10/22/2026
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

Purpose: Protect the business from unpaid operations while maintaining customer trust and avoiding data hostage disputes.
Detailed Explanation:
Active Trial Permissions: While a tenant is in an active trial, all core operational features (cashier checkout, product creation, inventory management) function normally within their designated trial quotas.
Post-Trial Failed Conversion (Read-Only Mode): If a trial expires and the card payment is declined, the application must immediately switch into Read-Only mode during the 7-day grace period. In this mode, store staff cannot process new sales, create inventory, or send SMS/emails, but the account owner can log in, view historical records, export data reports, and access the billing screen to update their payment method.
Full Suspension After Grace Expiration: If the 7-day grace period elapses without a successful payment, all tenant workspace requests are locked with a suspension screen requiring payment to reactivate.


Add

Subtasks


Add

Related issues

Actions #1

Updated by Divya Inapakurthi 11 days ago

  • Target version set to sprint (10/12/2026 - 10/31/2026)

Updated by Divya Inapakurthi 2 days ago

Work Completed for Task 5: Operational Access & Read-Only / Grace Enforcement

  • Backend Read-Only Grace Middleware Enforcement (`nursery.token.js`, `tenantPermissions.js`):
    - Implemented access control guardrails for tenants whose trial or payment has lapsed (`past_due` / `isReadOnlyGrace: true`).
    - Allowed unhindered `GET` requests so tenants can view historical transactions, reports, inventory records, and settings.
    - Intercepted and blocked mutating requests (`POST`, `PUT`, `DELETE`, `PATCH`) with a `403 Forbidden` response explaining the 7-day grace period with direct CTA to update payment details.
  • Dunning & Automated Expiration Lifecycle (`tenantBilling.service.js`, `tenantDunningCron.js`):
    - Integrated automated 7-day grace calculation (`graceEndsAt = now + gracePeriodDays`) upon trial completion or failed renewal.
    - Automated tenant status transition from `grace` / `past_due` to `suspended` when `graceEndsAt` has elapsed without payment resolution.
  • Tenant Notification & Lifecycle Mailers (`subscriptionBillingMailer.js`):
    - Implemented automated emails (`sendTrialConversionFailedEmail`, `sendSubscriptionStatusAlertEmail`) notifying company owners of the active 7-day grace period, read-only operational scope, and grace expiration date with direct Stripe portal links.
  • Frontend UI & Banner Experience (`PlanExpiryBanner.tsx`):
    - Added dedicated styling and messaging for `"⚠️ Read-Only Grace Period"`.
    - Displayed remaining grace days and an `"Update Payment Method"` action button linking directly to the billing portal.
Actions #3

Updated by Divya Inapakurthi 2 days ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Edit Copy Actions

Also available in: Atom PDF