# 2. Billing & Payment History — Test Cases

User Type: **Parent**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: billing_payment_history.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 |
|---------|--------------------|----------|
| 2.1 Billing History | List of all payments made | TC-PT-8-02-001 |
| 2.1 Billing History | Payment amount and date | TC-PT-8-02-002 |
| 2.1 Billing History | Payment status (completed, pending, failed) | TC-PT-8-02-003 |
| 2.1 Billing History | View a transaction detail | TC-PT-8-02-004 |
| 2.1 Billing History | Download a receipt | TC-PT-8-02-005 |
| 2.1 Billing History | Billing history available on web and mobile | TC-PT-8-02-006 |
| 2.1 Billing History | History event logging (viewed, downloaded) | TC-PT-8-02-007 |
| 2.1 Billing History | Audit logging of the billing history | TC-PT-8-02-008 |
| 2.1 Billing History | Rule: The history lists all payments with amount, date, and status. | TC-PT-8-02-001 |
| 2.1 Billing History | Rule: A transaction detail opens on tap. | TC-PT-8-02-002 |
| 2.1 Billing History | Rule: A receipt can be downloaded. | TC-PT-8-02-003 |
| 2.1 Billing History | Rule: History events (viewed, downloaded) are logged with the account and the timestamp. | TC-PT-8-02-004 |
| 2.1 Billing History | Rule: The billing history is audit-logged with the account and the timestamp. | TC-PT-8-02-005 |
| 2.2 Payment Methods | Add a payment method | TC-PT-8-02-009 |
| 2.2 Payment Methods | Remove a payment method | TC-PT-8-02-010 |
| 2.2 Payment Methods | Set a default payment method | TC-PT-8-02-011 |
| 2.2 Payment Methods | Saved payment methods list | TC-PT-8-02-012 |
| 2.2 Payment Methods | Payment method update | TC-PT-8-02-013 |
| 2.2 Payment Methods | Methods available on web and mobile | TC-PT-8-02-014 |
| 2.2 Payment Methods | Method event logging (added, removed, set default) | TC-PT-8-02-015 |
| 2.2 Payment Methods | Audit logging of the payment methods | TC-PT-8-02-016 |
| 2.2 Payment Methods | Rule: The payment methods can be added, removed, and updated. | TC-PT-8-02-009 |
| 2.2 Payment Methods | Rule: A default payment method is set. | TC-PT-8-02-010 |
| 2.2 Payment Methods | Rule: The saved methods are listed. | TC-PT-8-02-011 |
| 2.2 Payment Methods | Rule: Method events (added, removed, set default) are logged with the account and the timestamp. | TC-PT-8-02-012 |
| 2.2 Payment Methods | Rule: The payment methods is audit-logged with the account and the timestamp. | TC-PT-8-02-013 |
| 2.3 Invoices and Receipts | List of invoices | TC-PT-8-02-017 |
| 2.3 Invoices and Receipts | View an invoice | TC-PT-8-02-018 |
| 2.3 Invoices and Receipts | Download an invoice | TC-PT-8-02-019 |
| 2.3 Invoices and Receipts | Email an invoice | TC-PT-8-02-020 |
| 2.3 Invoices and Receipts | Invoices retained for a platform-defined period | TC-PT-8-02-021 |
| 2.3 Invoices and Receipts | Invoices available on web and mobile | TC-PT-8-02-022 |
| 2.3 Invoices and Receipts | Invoice event logging (viewed, downloaded, emailed) | TC-PT-8-02-023 |
| 2.3 Invoices and Receipts | Audit logging of the invoices and receipts | TC-PT-8-02-024 |
| 2.3 Invoices and Receipts | Rule: The invoices are listed and viewable. | TC-PT-8-02-017 |
| 2.3 Invoices and Receipts | Rule: An invoice can be downloaded and emailed. | TC-PT-8-02-018 |
| 2.3 Invoices and Receipts | Rule: The invoices are retained for the platform-defined period. | TC-PT-8-02-019 |
| 2.3 Invoices and Receipts | Rule: Invoice events (viewed, downloaded, emailed) are logged with the account and the timestamp. | TC-PT-8-02-020 |
| 2.3 Invoices and Receipts | Rule: The invoices and receipts is audit-logged with the account and the timestamp. | TC-PT-8-02-021 |

## 2.1 Billing History

### TC-PT-8-02-001 — List of all payments made
**Type:** Positive
**Covers:** 2.1 → List of all payments made; Rule: The history lists all payments with amount, date, and status.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: List of all payments made.
2. Observe the result and verify the full behavior: List of all payments made.
**Expected Result:** List of all payments made — delivered exactly as documented.
**Priority:** Critical

### TC-PT-8-02-002 — Payment amount and date
**Type:** Positive
**Covers:** 2.1 → Payment amount and date; Rule: A transaction detail opens on tap.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Payment amount and date.
2. Observe the result and verify the full behavior: Payment amount and date.
**Expected Result:** Payment amount and date — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-003 — Payment status (completed, pending, failed)
**Type:** Positive
**Covers:** 2.1 → Payment status (completed, pending, failed); Rule: A receipt can be downloaded.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Payment status (completed.
2. Observe the result and verify the full behavior: Payment status (completed, pending, failed).
**Expected Result:** Payment status (completed, pending, failed) — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-004 — View a transaction detail
**Type:** Positive
**Covers:** 2.1 → View a transaction detail; Rule: History events (viewed, downloaded) are logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: View a transaction detail.
2. Observe the result and verify the full behavior: View a transaction detail.
**Expected Result:** View a transaction detail — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-005 — Download a receipt
**Type:** Positive
**Covers:** 2.1 → Download a receipt; Rule: The billing history is audit-logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Download a receipt.
2. Observe the result and verify the full behavior: Download a receipt.
**Expected Result:** Download a receipt — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-006 — Billing history available on web and mobile
**Type:** Positive
**Covers:** 2.1 → Billing history available on web and mobile
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Billing history available on web and mobile.
2. Observe the result and verify the full behavior: Billing history available on web and mobile.
**Expected Result:** Billing history available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-007 — History event logging (viewed, downloaded)
**Type:** Positive
**Covers:** 2.1 → History event logging (viewed, downloaded)
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: History event logging (viewed.
2. Observe the result and verify the full behavior: History event logging (viewed, downloaded).
**Expected Result:** History event logging (viewed, downloaded) — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-008 — Audit logging of the billing history
**Type:** Positive
**Covers:** 2.1 → Audit logging of the billing history
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, perform the action associated with: Audit logging of the billing history.
2. Open the relevant activity / audit log and verify the event is recorded with the account, the action, and the timestamp.
**Expected Result:** The action is audit-logged — the account, the action, and the timestamp are recorded.
**Priority:** Critical

## 2.2 Payment Methods

### TC-PT-8-02-009 — Add a payment method
**Type:** Positive
**Covers:** 2.2 → Add a payment method; Rule: The payment methods can be added, removed, and updated.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Add a payment method.
2. Observe the result and verify the full behavior: Add a payment method.
**Expected Result:** Add a payment method — delivered exactly as documented.
**Priority:** Critical

### TC-PT-8-02-010 — Remove a payment method
**Type:** Positive
**Covers:** 2.2 → Remove a payment method; Rule: A default payment method is set.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Remove a payment method.
2. Observe the result and verify the full behavior: Remove a payment method.
**Expected Result:** Remove a payment method — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-011 — Set a default payment method
**Type:** Positive
**Covers:** 2.2 → Set a default payment method; Rule: The saved methods are listed.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Set a default payment method.
2. Observe the result and verify the full behavior: Set a default payment method.
**Expected Result:** Set a default payment method — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-012 — Saved payment methods list
**Type:** Positive
**Covers:** 2.2 → Saved payment methods list; Rule: Method events (added, removed, set default) are logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Saved payment methods list.
2. Observe the result and verify the full behavior: Saved payment methods list.
**Expected Result:** Saved payment methods list — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-013 — Payment method update
**Type:** Positive
**Covers:** 2.2 → Payment method update; Rule: The payment methods is audit-logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Payment method update.
2. Observe the result and verify the full behavior: Payment method update.
**Expected Result:** Payment method update — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-014 — Methods available on web and mobile
**Type:** Positive
**Covers:** 2.2 → Methods available on web and mobile
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Methods available on web and mobile.
2. Observe the result and verify the full behavior: Methods available on web and mobile.
**Expected Result:** Methods available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-015 — Method event logging (added, removed, set default)
**Type:** Positive
**Covers:** 2.2 → Method event logging (added, removed, set default)
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Method event logging (added.
2. Observe the result and verify the full behavior: Method event logging (added, removed, set default).
**Expected Result:** Method event logging (added, removed, set default) — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-016 — Audit logging of the payment methods
**Type:** Positive
**Covers:** 2.2 → Audit logging of the payment methods
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, perform the action associated with: Audit logging of the payment methods.
2. Open the relevant activity / audit log and verify the event is recorded with the account, the action, and the timestamp.
**Expected Result:** The action is audit-logged — the account, the action, and the timestamp are recorded.
**Priority:** Critical

## 2.3 Invoices and Receipts

### TC-PT-8-02-017 — List of invoices
**Type:** Positive
**Covers:** 2.3 → List of invoices; Rule: The invoices are listed and viewable.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: List of invoices.
2. Observe the result and verify the full behavior: List of invoices.
**Expected Result:** List of invoices — delivered exactly as documented.
**Priority:** Critical

### TC-PT-8-02-018 — View an invoice
**Type:** Positive
**Covers:** 2.3 → View an invoice; Rule: An invoice can be downloaded and emailed.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: View an invoice.
2. Observe the result and verify the full behavior: View an invoice.
**Expected Result:** View an invoice — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-019 — Download an invoice
**Type:** Positive
**Covers:** 2.3 → Download an invoice; Rule: The invoices are retained for the platform-defined period.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Download an invoice.
2. Observe the result and verify the full behavior: Download an invoice.
**Expected Result:** Download an invoice — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-020 — Email an invoice
**Type:** Positive
**Covers:** 2.3 → Email an invoice; Rule: Invoice events (viewed, downloaded, emailed) are logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Email an invoice.
2. Observe the result and verify the full behavior: Email an invoice.
**Expected Result:** Email an invoice — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-021 — Invoices retained for a platform-defined period
**Type:** Positive
**Covers:** 2.3 → Invoices retained for a platform-defined period; Rule: The invoices and receipts is audit-logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Invoices retained for a platform-defined period.
2. Observe the result and verify the full behavior: Invoices retained for a platform-defined period.
**Expected Result:** Invoices retained for a platform-defined period — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-022 — Invoices available on web and mobile
**Type:** Positive
**Covers:** 2.3 → Invoices available on web and mobile
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Invoices available on web and mobile.
2. Observe the result and verify the full behavior: Invoices available on web and mobile.
**Expected Result:** Invoices available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-023 — Invoice event logging (viewed, downloaded, emailed)
**Type:** Positive
**Covers:** 2.3 → Invoice event logging (viewed, downloaded, emailed)
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Invoice event logging (viewed.
2. Observe the result and verify the full behavior: Invoice event logging (viewed, downloaded, emailed).
**Expected Result:** Invoice event logging (viewed, downloaded, emailed) — delivered exactly as documented.
**Priority:** High

### TC-PT-8-02-024 — Audit logging of the invoices and receipts
**Type:** Positive
**Covers:** 2.3 → Audit logging of the invoices and receipts
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, perform the action associated with: Audit logging of the invoices and receipts.
2. Open the relevant activity / audit log and verify the event is recorded with the account, the action, and the timestamp.
**Expected Result:** The action is audit-logged — the account, the action, and the timestamp are recorded.
**Priority:** Critical
