Skip to main content

User Subscription Management

The User Subscription feature allows admins to assign, track, and manage subscriptions for individual learners.
Each subscription is linked to a package and price, with detailed status and time tracking.


Fields

FieldTypeRequiredNotes
User EmailSelectYesSearch and select a registered user.
Subscription PackageSelectYesChoose from available subscription packages (e.g., Free, Pro, Premium).
Subscription PriceSelectYesChoose from defined prices (monthly, yearly, trial, etc.).
StatusEnumYesActive, Inactive, or Cancelled.
Cancelled AtDateTimeOptionalWhen the subscription was cancelled (if applicable).
Trial Ends AtDateTimeOptionalWhen the free trial period ends.
Start DateDateTimeYesSubscription activation date.
End DateDateTimeOptionalExpiration date (for time-bound subscriptions).
DescriptionTextOptionalNotes or details about the subscription.

1. Create User Subscription

Steps:

  1. Go to Backoffice → User Subscriptions.
  2. Click New User Subscription.
  3. Select User Email, Package, and Price.
  4. Fill in dates and status.
  5. Save to assign the subscription.

Example Request (JSON):

{
"userEmail": "alice@example.com",
"subscriptionPackage": "PRO",
"subscriptionPrice": "PRO_MONTHLY",
"status": "active",
"trialEndsAt": "2025-02-10T23:59:59Z",
"startDate": "2025-02-01T00:00:00Z",
"endDate": "2025-03-01T00:00:00Z",
"description": "Assigned Pro Monthly subscription with 7-day trial."
}
Response:

json
Copy code
{
"success": true,
"message": "User subscription created successfully"
}
2. View User Subscriptions (Table)
User Email Package Price Status Trial Ends Start Date End Date Actions
alice@example.com PRO PRO_MONTHLY Active 2025-02-10 2025-02-01 2025-03-01 Edit / Cancel
bob@example.com FREE FREE_TRIAL Cancelled — 2025-01-01 2025-01-15 View
carol@example.com PREM PREM_YEARLY Active — 2025-01-20 2026-01-20 Edit / Cancel

3. Update User Subscription
Steps:

Go to User Subscriptions Table.

Click Edit ✏️.

Update fields such as status, dates, or description.

Save changes.

Example Update Request:

json
Copy code
{
"subscriptionId": "usersub-101",
"status": "cancelled",
"cancelledAt": "2025-02-05T12:00:00Z",
"description": "Cancelled by admin due to payment failure."
}
Response:

json
Copy code
{
"success": true,
"message": "User subscription updated successfully"
}
4. Delete User Subscription
⚠️ Deletion should only be used for test data or mistakes.
Normally, subscriptions should be cancelled instead of deleted.

Example Request:

json
Copy code
{
"subscriptionId": "usersub-101",
"action": "delete"
}
Response:

json
Copy code
{
"success": true,
"message": "User subscription deleted successfully"
}
Best Practices
Always set Start and End Dates clearly for recurring subscriptions.

Use Trial Ends At to automatically transition from trial → paid.

Prefer Cancelled status instead of deletion to keep records.

Use Description for internal notes (e.g., why a subscription was cancelled).

Regularly audit subscriptions to ensure learners are billed correctly.