ChinmayOnGithub / ChinmayOnGithub/tracker

[CRITICAL][Billing] Make every advertised Pro service actually available and server-enforced

Open
#51 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
16m
Merged PRs (30d)
3

Description

Problem

Razorpay checkout/subscription infrastructure is functioning in Test Mode, and the entitlement engine can calculate Pro entitlements, but a paid user still does not consistently see or receive the Pro services advertised on the pricing page.

Current entitlement definitions include advanced calendar, advanced journal, advanced vault, unlimited notes, and priority sync.

The pricing/plan configuration advertises capabilities including:

  • Automated External Calendar Sync & Writebacks
  • Rich Journal & Link Exports
  • Unlimited Historical Notes & Analytics
  • Priority Cloud Sync & Offline Queue Engine
  • expanded Vault capacity

This is a launch-blocking billing/product correctness issue: a customer must receive exactly what the paid plan promises.

Required work

Perform a complete Pro entitlement audit from pricing copy to actual implementation.

For every advertised Pro service verify this chain:

Pricing promise
-> entitlement key/limit
-> server-side authorization
-> actual feature/service implementation
-> client UI state
-> automated test
-> active subscription lifecycle

Do not consider an entitlement complete merely because EntitlementService returns true.

Required entitlement matrix

Paid capability Entitlement Server enforcement UI availability End-to-end test
Advanced Calendar / external sync & writebacks advanced_calendar required required required
Rich Journal exports advanced_journal required required required
Advanced Vault / expanded capacity advanced_vault / vault limit required required required
Unlimited notes/history/analytics unlimited_notes required required required
Priority sync / backup behavior priority_sync required required required
Rich Link exports existing Pro entitlement/appropriate feature key required required required

If a promised service is not actually implemented yet, do not fake the entitlement. Either implement the service or change the pricing promise before launch.

Server-side requirements

All premium operations must enforce entitlements at the server boundary.

A customer must not be able to obtain a Pro-only capability by:

  • calling an API directly;
  • invoking a Server Action directly;
  • manipulating client state;
  • changing localStorage;
  • changing a client-side isPro value;
  • navigating directly to a hidden UI route.

Use the existing EntitlementService and requireEntitlement architecture. Do not create a second billing/permission system.

Lifecycle requirements

Verify:

  • Free -> no Pro services
  • Monthly ACTIVE -> all Monthly Pro services
  • Annual ACTIVE -> all Annual Pro services
  • cancel-at-period-end -> Pro remains available until currentPeriodEnd
  • expired -> Pro removed
  • halted/past-due -> behavior follows the documented billing policy
  • webhook activation -> entitlements become available
  • webhook cancellation/expiry -> entitlements are removed at the correct time

Existing users

Audit how existing accounts are represented.

Do not grant Pro merely because a user is old or because they previously used a feature.

An existing account without a valid paid subscription should remain on the Free entitlement set.

Any historical/legacy premium access must be explicitly identified and migrated rather than inferred from UI state.

UI requirements

After a subscription becomes ACTIVE:

  • actual Pro features visibly become available;
  • locked/upgrade UI disappears where appropriate;
  • Billing Settings shows the exact active plan;
  • the client refreshes/revalidates after webhook activation without logout/login;
  • loading states do not briefly show Free after the user is entitled.

Testing requirements

Add end-to-end coverage for a real paid test account:

  1. Free account sees Free capabilities.
  2. Test subscription becomes ACTIVE.
  3. Entitlement resolves to Pro.
  4. Every advertised Pro service becomes available.
  5. Each service works, not merely renders.
  6. Direct unauthorized calls fail for Free.
  7. Cancellation preserves access until period end.
  8. Expiration removes access.
  9. Monthly and Annual both receive the correct feature set.
  10. Refresh/new session preserves the correct entitlement.

Acceptance criteria

  • Every item shown as included in Pro is actually usable by a paid customer.
  • Every Pro-only operation is protected server-side.
  • No pricing promise exists without a corresponding working implementation.
  • Free users cannot bypass restrictions.
  • Existing users are not accidentally granted or stripped of access.
  • Automated tests prove the complete paid-user journey.
  • A fresh paid test account can exercise every advertised Pro capability end-to-end.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pricing/plan configuration, EntitlementService, and requireEntitlement architecture, then trace each listed Pro capability through server authorization, UI availability, and subscription lifecycle handling. Add or inspect end-to-end coverage for Free, active Monthly and Annual, cancellation, expiration, webhook, refresh, and direct-call cases. Done means every advertised service works for paid test accounts and cannot be bypassed by Free users.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, frontend, payments, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.