# 6. Subscription Billing Operations — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: subscription_billing_operations.md — every feature, sub-feature, and rule covered

---

## Test Execution Policy
- Zero tolerance: any deviation from documented behavior = FAILED = bug
- Every bug is immediately logged/reported (Bug ID, feature, sub-feature,
  expected vs actual, severity) and fixed 100% before the group passes
- Feature group passes only at 100% test pass rate

## Coverage Matrix
| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 6.1 Manage Subscription Renewals and Upgrades | Renewal management: the management (the renewal, the subscription, the billing, the date) | TC-SA-15-06-001 |
| 6.1 Manage Subscription Renewals and Upgrades | Upgrade management: the management (the upgrade, the subscription, the billing, the proration) | TC-SA-15-06-002 |
| 6.1 Manage Subscription Renewals and Upgrades | Renewal billing: the billing (the billing for the renewal, the amount) | TC-SA-15-06-003 |
| 6.1 Manage Subscription Renewals and Upgrades | Upgrade billing: the billing (the billing for the upgrade, the amount, the proration) | TC-SA-15-06-004 |
| 6.1 Manage Subscription Renewals and Upgrades | Operation record: the record (the subscription, the operation, the billing, the date) | TC-SA-15-06-005 |
| 6.1 Manage Subscription Renewals and Upgrades | Operation view: the view (the operations, the period) | TC-SA-15-06-006 |
| 6.1 Manage Subscription Renewals and Upgrades | Audit logging of the renewal and upgrade management | TC-SA-15-06-007 |
| 6.1 Manage Subscription Renewals and Upgrades | Rule: the renewal management is the action (the renewal, the subscription, the billing, the date); the management is the operation | TC-SA-15-06-001 |
| 6.1 Manage Subscription Renewals and Upgrades | Rule: the upgrade management is the action (the upgrade, the subscription, the billing, the proration); the management is the operation | TC-SA-15-06-002 |
| 6.1 Manage Subscription Renewals and Upgrades | Rule: the renewal billing is the charge (the billing for the renewal, the amount); the billing is the value | TC-SA-15-06-003 |
| 6.1 Manage Subscription Renewals and Upgrades | Rule: the upgrade billing is the charge (the billing for the upgrade, the amount, the proration); the billing is the value | TC-SA-15-06-004 |
| 6.1 Manage Subscription Renewals and Upgrades | Rule: the operations are visible (the operations, the period); the management is managed | TC-SA-15-06-006 |
| 6.1 Manage Subscription Renewals and Upgrades | Rule: renewal and upgrade management is audit-logged with the subscription, operation, and timestamp | TC-SA-15-06-007 |
| 6.2 Handle Bulk License Billing for Institutes | Bulk billing: the billing (the billing, the institute, the count, the amount) | TC-SA-15-06-008 |
| 6.2 Handle Bulk License Billing for Institutes | License count: the count (the count of the licenses, the tier) | TC-SA-15-06-009 |
| 6.2 Handle Bulk License Billing for Institutes | Billing amount: the amount (the amount of the billing, the tier's price) | TC-SA-15-06-010 |
| 6.2 Handle Bulk License Billing for Institutes | Billing processing: the processing (the billing is processed, the amount is charged) | TC-SA-15-06-011 |
| 6.2 Handle Bulk License Billing for Institutes | Billing record: the record (the institute, the count, the amount, the date) | TC-SA-15-06-012 |
| 6.2 Handle Bulk License Billing for Institutes | Billing view: the view (the billings, the institutes, the period) | TC-SA-15-06-013 |
| 6.2 Handle Bulk License Billing for Institutes | Audit logging of the bulk license billing | TC-SA-15-06-014 |
| 6.2 Handle Bulk License Billing for Institutes | Rule: the bulk billing is the charge (the billing, the institute, the count, the amount); the billing is the value | TC-SA-15-06-008 |
| 6.2 Handle Bulk License Billing for Institutes | Rule: the license count is the volume (the count of the licenses, the tier); the count is the measure | TC-SA-15-06-009 |
| 6.2 Handle Bulk License Billing for Institutes | Rule: the billing amount is the value (the amount of the billing, the tier's price); the amount is the charge | TC-SA-15-06-010 |
| 6.2 Handle Bulk License Billing for Institutes | Rule: the billings are visible (the billings, the institutes, the period); the billing is managed | TC-SA-15-06-013 |
| 6.2 Handle Bulk License Billing for Institutes | Rule: bulk license billing is audit-logged with the institute, count, and timestamp | TC-SA-15-06-014 |
| 6.3 Track Affiliate Payouts | Payout tracking: the tracking (the payout, the affiliate, the amount, the date) | TC-SA-15-06-015 |
| 6.3 Track Affiliate Payouts | Payout status: the status (the pending, the processed, the paid) | TC-SA-15-06-016 |
| 6.3 Track Affiliate Payouts | Payout amount: the amount (the amount of the payout, the commission) | TC-SA-15-06-017 |
| 6.3 Track Affiliate Payouts | Payout record: the record (the affiliate, the payout, the amount, the date) | TC-SA-15-06-018 |
| 6.3 Track Affiliate Payouts | Payout view: the view (the payouts, the affiliates, the period) | TC-SA-15-06-019 |
| 6.3 Track Affiliate Payouts | Payout export: the export (the payouts, the format, the period) | TC-SA-15-06-020 |
| 6.3 Track Affiliate Payouts | Audit logging of the affiliate payout tracking | TC-SA-15-06-021 |
| 6.3 Track Affiliate Payouts | Rule: the payout tracking is the visibility (the payout, the affiliate, the amount, the date); the tracking is the record | TC-SA-15-06-015 |
| 6.3 Track Affiliate Payouts | Rule: the payout status is the state (the pending, the processed, the paid); the status is the control | TC-SA-15-06-016 |
| 6.3 Track Affiliate Payouts | Rule: the payout amount is the value (the amount of the payout, the commission); the amount is the measure | TC-SA-15-06-017 |
| 6.3 Track Affiliate Payouts | Rule: the payouts are visible (the payouts, the affiliates, the period); the tracking is managed | TC-SA-15-06-019 |
| 6.3 Track Affiliate Payouts | Rule: affiliate payout tracking is audit-logged with the affiliate, payout, and timestamp | TC-SA-15-06-021 |

## 6.1 Manage Subscription Renewals and Upgrades

### TC-SA-15-06-001 — Renewal management: the management (the renewal, the subscription, the billing, the date); the management is the operation
**Type:** Positive
**Covers:** 6.1 → Renewal management: the management (the renewal, the subscription, the billing, the date); Rule: the renewal management is the action (the renewal, the subscription, the billing, the date); the management is the operation
**Preconditions:** A subscription is due for renewal.
**Steps:**
1. View the subscription operations: the operations (the renewal, the upgrade, the subscription, the billing, the date), the period (the period of the operations).
2. Manage a renewal: the management (the renewal, the subscription, the billing, the date) — verify the management is the action.
3. Verify the renewal is processed and the subscription is renewed.
**Expected Result:** The renewal management works — the renewal, the subscription, the billing, and the date are managed.
**Priority:** Critical

### TC-SA-15-06-002 — Upgrade management: the management (the upgrade, the subscription, the billing, the proration); the management is the operation
**Type:** Positive
**Covers:** 6.1 → Upgrade management: the management (the upgrade, the subscription, the billing, the proration); Rule: the upgrade management is the action (the upgrade, the subscription, the billing, the proration); the management is the operation
**Preconditions:** A subscription is eligible for an upgrade.
**Steps:**
1. Manage an upgrade: the management (the upgrade, the subscription, the billing, the proration) — verify the management is the action.
2. Verify the upgrade is processed and the subscription is upgraded.
3. Verify the proration is applied to the upgrade billing.
**Expected Result:** The upgrade management works — the upgrade, the subscription, the billing, and the proration are managed.
**Priority:** Critical

### TC-SA-15-06-003 — Renewal billing: the billing (the billing for the renewal, the amount); the billing is the value
**Type:** Positive
**Covers:** 6.1 → Renewal billing: the billing (the billing for the renewal, the amount); Rule: the renewal billing is the charge (the billing for the renewal, the amount); the billing is the value
**Preconditions:** A renewal is being managed.
**Steps:**
1. Process the renewal billing: the billing (the billing for the renewal, the amount) — verify the billing is the charge.
2. Verify the amount is charged to the user.
**Expected Result:** The renewal billing is processed — the billing for the renewal and the amount are the value.
**Priority:** Critical

### TC-SA-15-06-004 — Upgrade billing: the billing (the billing for the upgrade, the amount, the proration); the billing is the value
**Type:** Edge
**Covers:** 6.1 → Upgrade billing: the billing (the billing for the upgrade, the amount, the proration); Rule: the upgrade billing is the charge (the billing for the upgrade, the amount, the proration); the billing is the value
**Preconditions:** An upgrade is being managed mid-period.
**Steps:**
1. Process the upgrade billing: the billing (the billing for the upgrade, the amount, the proration) — verify the billing is the charge.
2. Verify the proration is applied (the remaining period is credited).
3. Verify the amount charged is the prorated difference.
**Expected Result:** The upgrade billing is processed — the billing for the upgrade, the amount, and the proration are the value.
**Priority:** Critical

### TC-SA-15-06-005 — Operation record: the record (the subscription, the operation, the billing, the date); the record is the proof
**Type:** Positive
**Covers:** 6.1 → Operation record: the record (the subscription, the operation, the billing, the date)
**Preconditions:** A renewal or upgrade operation has been processed.
**Steps:**
1. Open the operation record.
2. Verify it shows the subscription, the operation, the billing, and the date.
**Expected Result:** The operation is recorded — the subscription, the operation, the billing, and the date are shown.
**Priority:** High

### TC-SA-15-06-006 — Operation view: the view (the operations, the period); the management is managed
**Type:** Positive
**Covers:** 6.1 → Operation view: the view (the operations, the period); Rule: the operations are visible (the operations, the period); the management is managed
**Preconditions:** Renewal and upgrade operations exist across a period.
**Steps:**
1. View the operations: the operations, the period — verify the operations are visible.
2. Verify the view is complete for the period.
**Expected Result:** The operation view works — the operations for the period are visible.
**Priority:** High

### TC-SA-15-06-007 — Renewal and upgrade management is audit-logged with the subscription, operation, and timestamp
**Type:** Positive
**Covers:** 6.1 → Audit logging of the renewal and upgrade management; Rule: renewal and upgrade management is audit-logged with the subscription, operation, and timestamp
**Preconditions:** Renewal and upgrade operations have been processed.
**Steps:**
1. Open the audit trail and filter by "subscription operation".
2. Verify entries show the subscription, the operation, and the timestamp.
**Expected Result:** The renewal and upgrade management is audit-logged with the subscription, operation, and timestamp.
**Priority:** Critical

## 6.2 Handle Bulk License Billing for Institutes

### TC-SA-15-06-008 — Bulk billing: the billing (the billing, the institute, the count, the amount); the billing is the value
**Type:** Positive
**Covers:** 6.2 → Bulk billing: the billing (the billing, the institute, the count, the amount); Rule: the bulk billing is the charge (the billing, the institute, the count, the amount); the billing is the value
**Preconditions:** An institute has a bulk license order.
**Steps:**
1. View the bulk license billings: the billings (the billing, the institute, the count, the amount, the date), the period (the period of the billings).
2. Process a bulk billing: the billing (the billing, the institute, the count, the amount) — verify the billing is the charge.
**Expected Result:** The bulk billing is processed — the billing, the institute, the count, and the amount are the value.
**Priority:** Critical

### TC-SA-15-06-009 — License count: the count (the count of the licenses, the tier); the count is the measure
**Type:** Positive
**Covers:** 6.2 → License count: the count (the count of the licenses, the tier); Rule: the license count is the volume (the count of the licenses, the tier); the count is the measure
**Preconditions:** A bulk billing is being processed.
**Steps:**
1. Set the license count: the count (the count of the licenses, the tier).
2. Verify the count is the volume and is saved.
**Expected Result:** The license count is set — the count of the licenses and the tier are the measure.
**Priority:** High

### TC-SA-15-06-010 — Billing amount: the amount (the amount of the billing, the tier's price); the amount is the charge
**Type:** Edge
**Covers:** 6.2 → Billing amount: the amount (the amount of the billing, the tier's price); Rule: the billing amount is the value (the amount of the billing, the tier's price); the amount is the charge
**Preconditions:** A bulk billing is being processed with a tiered pricing structure.
**Steps:**
1. Set the billing amount: the amount (the amount of the billing, the tier's price).
2. Verify the amount is calculated per the tier's price (e.g., 100 licenses at the tier's per-seat price).
3. Verify the amount is the charge and is correct.
**Expected Result:** The billing amount is set — the amount of the billing per the tier's price is the charge.
**Priority:** Critical

### TC-SA-15-06-011 — Billing processing: the processing (the billing is processed, the amount is charged); the processing is the action
**Type:** Positive
**Covers:** 6.2 → Billing processing: the processing (the billing is processed, the amount is charged)
**Preconditions:** A bulk billing is configured (the institute, the count, the amount).
**Steps:**
1. Process the billing: the processing (the billing is processed, the amount is charged) — verify the processing is the action.
2. Verify the amount is charged to the institute.
3. The institute is notified: the notification (the billing, the count, the amount) — verify the notification is sent.
**Expected Result:** The billing is processed — the amount is charged and the institute is notified.
**Priority:** Critical

### TC-SA-15-06-012 — Billing record: the record (the institute, the count, the amount, the date); the record is the proof
**Type:** Positive
**Covers:** 6.2 → Billing record: the record (the institute, the count, the amount, the date)
**Preconditions:** A bulk billing has been processed.
**Steps:**
1. Open the billing record.
2. Verify it shows the institute, the count, the amount, and the date.
**Expected Result:** The billing is recorded — the institute, the count, the amount, and the date are shown.
**Priority:** High

### TC-SA-15-06-013 — Billing view: the view (the billings, the institutes, the period); the billing is managed
**Type:** Positive
**Covers:** 6.2 → Billing view: the view (the billings, the institutes, the period); Rule: the billings are visible (the billings, the institutes, the period); the billing is managed
**Preconditions:** Bulk billings exist for multiple institutes across a period.
**Steps:**
1. View the billings: the billings, the institutes, the period — verify the billings are visible.
2. Verify the view is complete for the period.
**Expected Result:** The billing view works — the billings for the institutes and the period are visible.
**Priority:** High

### TC-SA-15-06-014 — Bulk license billing is audit-logged with the institute, count, and timestamp
**Type:** Positive
**Covers:** 6.2 → Audit logging of the bulk license billing; Rule: bulk license billing is audit-logged with the institute, count, and timestamp
**Preconditions:** Bulk billings have been processed.
**Steps:**
1. Open the audit trail and filter by "bulk license billing".
2. Verify entries show the institute, the count, and the timestamp.
**Expected Result:** The bulk license billing is audit-logged with the institute, count, and timestamp.
**Priority:** Critical

## 6.3 Track Affiliate Payouts

### TC-SA-15-06-015 — Payout tracking: the tracking (the payout, the affiliate, the amount, the date); the tracking is the record
**Type:** Positive
**Covers:** 6.3 → Payout tracking: the tracking (the payout, the affiliate, the amount, the date); Rule: the payout tracking is the visibility (the payout, the affiliate, the amount, the date); the tracking is the record
**Preconditions:** Affiliate payouts exist.
**Steps:**
1. View the affiliate payout tracking: the payouts (the payout, the affiliate, the amount, the date), the statuses (the pending, the processed, the paid), and the period (the period of the payouts).
2. Verify the tracking is the record and is complete.
**Expected Result:** The payout tracking is shown — the payout, the affiliate, the amount, and the date are visible.
**Priority:** Critical

### TC-SA-15-06-016 — Payout status: the status (the pending, the processed, the paid); the status is the control
**Type:** Positive
**Covers:** 6.3 → Payout status: the status (the pending, the processed, the paid); Rule: the payout status is the state (the pending, the processed, the paid); the status is the control
**Preconditions:** Affiliate payouts exist in all three statuses.
**Steps:**
1. View the pending payouts: the pending (the payout that is pending, the affiliate, the amount) — verify the pending is the in-progress.
2. View the processed payouts: the processed (the payout that is processed, the affiliate, the amount) — verify the processed is the done.
3. View the paid payouts: the paid (the payout that is paid, the affiliate, the amount) — verify the paid is the settled.
**Expected Result:** The payout status is shown — the pending, the processed, or the paid state is visible for each payout.
**Priority:** High

### TC-SA-15-06-017 — Payout amount: the amount (the amount of the payout, the commission); the amount is the measure
**Type:** Positive
**Covers:** 6.3 → Payout amount: the amount (the amount of the payout, the commission); Rule: the payout amount is the value (the amount of the payout, the commission); the amount is the measure
**Preconditions:** Affiliate payouts exist.
**Steps:**
1. View the payout amounts — verify the amount of the payout (the commission) is shown for each payout.
2. Verify the amount matches the commission earned by the affiliate.
**Expected Result:** The payout amount is shown — the amount of the payout (the commission) is the measure.
**Priority:** High

### TC-SA-15-06-018 — Payout record: the record (the affiliate, the payout, the amount, the date); the record is the proof
**Type:** Positive
**Covers:** 6.3 → Payout record: the record (the affiliate, the payout, the amount, the date)
**Preconditions:** Affiliate payouts exist.
**Steps:**
1. Open the payout record.
2. Verify it shows the affiliate, the payout, the amount, and the date.
**Expected Result:** The payout is recorded — the affiliate, the payout, the amount, and the date are shown.
**Priority:** High

### TC-SA-15-06-019 — Payout view: the view (the payouts, the affiliates, the period); the tracking is managed
**Type:** Positive
**Covers:** 6.3 → Payout view: the view (the payouts, the affiliates, the period); Rule: the payouts are visible (the payouts, the affiliates, the period); the tracking is managed
**Preconditions:** Affiliate payouts exist for multiple affiliates across a period.
**Steps:**
1. View the payouts: the payouts, the affiliates, the period — verify the payouts are visible.
2. For a specific affiliate, view the affiliate's payouts (the payouts, the amounts, the dates, the period) — verify the detail is shown.
**Expected Result:** The payout view works — the payouts for the affiliates and the period are visible.
**Priority:** High

### TC-SA-15-06-020 — Payout export: the export (the payouts, the format, the period); the export is the record
**Type:** Positive
**Covers:** 6.3 → Payout export: the export (the payouts, the format, the period)
**Preconditions:** Affiliate payouts exist for a period.
**Steps:**
1. Export the payouts: the export (the payouts, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the payout view.
**Expected Result:** The payouts are exported — the payouts in the selected format for the period are generated.
**Priority:** Medium

### TC-SA-15-06-021 — Affiliate payout tracking is audit-logged with the affiliate, payout, and timestamp
**Type:** Positive
**Covers:** 6.3 → Audit logging of the affiliate payout tracking; Rule: affiliate payout tracking is audit-logged with the affiliate, payout, and timestamp
**Preconditions:** Affiliate payout tracking events have occurred.
**Steps:**
1. Open the audit trail and filter by "affiliate payout".
2. Verify entries show the affiliate, the payout, and the timestamp.
**Expected Result:** The affiliate payout tracking is audit-logged with the affiliate, payout, and timestamp.
**Priority:** Critical
