Introduce is_free plans with gateway-free checkout enrollment, require positive pricing for paid plans, and block duplicate category plus period combinations including free versus paid.
Co-authored-by: Cursor <cursoragent@cursor.com>
Return 409 with a clear message instead of a foreign-key 500 when a plan is still referenced by user subscriptions.
Co-authored-by: Cursor <cursoragent@cursor.com>
Link checkout payments to a pending subscription row and activate it on success, or cancel it when payment fails, is cancelled, or expires.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use one user-scoped extend endpoint that grants or renews by plan_id, charge admin payments at plan price for revenue, and refresh the admin panel integration guide.
Co-authored-by: Cursor <cursoragent@cursor.com>
Record complimentary admin payment rows for audit, cancel only open payments so paid revenue stays intact, and exclude ADMIN_GRANT/ADMIN_EXTEND from revenue analytics.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add streaming CSV export for payments, users, subscriptions, activity logs, and team members with list-filter parity, RBAC permissions, and admin panel documentation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose GET /admin/users/:user_id/subscriptions with full plan history and payments, and GET /admin/users/:user_id/learning-activity with LMS and exam-prep progress, completions, and recent timeline.
Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce plan and content categories across programs and exam-prep catalog roots, wire category-aware checkout and access checks, and keep learner gating temporarily bypassed until data migration is ready.
Co-authored-by: Cursor <cursoragent@cursor.com>