# 2. Transaction Management

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*

---

## 2. Transaction Management

### 2.1 View All Transactions and Payment History
**What it does:** Views all the transactions and the payment history: the transactions (the payment, the user, the amount, the date, the status) are viewable, so the payments are visible (the history is the record). The Super Administrator views the transactions (the filters, the period, the status) so the viewing is structured and the history is explicit.

**Sub-features:**
- Transaction view: the view (the transactions, the filters, the period)
- Transaction detail: the detail (the payment, the user, the amount, the date, the status)
- Payment history: the history (the history of the payments, the period)
- Transaction filter: the filter (the filter by the user, the amount, the date, the status)
- Transaction search: the search (the search by the transaction ID, the user)
- Transaction export: the export (the transactions, the format, the period)
- Audit logging of the transaction viewing

**Super Administrator User Journey:**
1. Super Admin views the transactions: the transactions (the payment, the user, the amount, the date, the status), the filters (the user, the amount, the date, the status), and the period (the period of the transactions); the view is explicit.
2. Sets the transaction filter: the filter (the filter by the user, the amount, the date, the status); the filter is the scope.
3. Views the transaction detail: the detail (the payment, the user, the amount, the date, the status); the detail is the record.
4. Views the payment history: the history (the history of the payments, the period); the history is the timeline.
5. Searches a transaction: the search (the search by the transaction ID, the user); the search is the lookup.
6. Exports the transactions: the export (the transactions, the format, the period); the export is the record.
7. Reviews the transactions: the transactions, the filters, the period, so the payments are visible.
8. The transaction viewing is audit-logged with the transaction, the filter, and the timestamp.

**Rules & Edge Cases:**
- The transaction view is the visibility (the transactions, the filters, the period); the view is the access.
- The transaction detail is the record (the payment, the user, the amount, the date, the status); the detail is the proof.
- The payment history is the timeline (the history of the payments, the period); the history is the context.
- The transaction filter is the scope (the filter by the user, the amount, the date, the status); the filter is the control.
- The transactions are visible (the transactions, the filters, the period); the viewing is managed.
- Transaction viewing is audit-logged with the transaction, filter, and timestamp.

### 2.2 Track Payment Status (Pending, Successful, Failed)
**What it does:** Tracks the payment status: the status of the payments (the pending, the successful, the failed) is tracked, so the payment states are visible (the status is the state). The Super Administrator views the payment status tracking (the payment, the status, the date) so the tracking is structured and the status is explicit.

**Sub-features:**
- Payment status: the status (the pending, the successful, the failed)
- Pending payment: the pending (the payment that is in progress, e.g., the gateway is processing)
- Successful payment: the successful (the payment that is completed, e.g., the amount is received)
- Failed payment: the failed (the payment that is failed, e.g., the card is declined)
- Status record: the record (the payment, the status, the date)
- Status view: the view (the payments, the statuses, the period)
- Audit logging of the payment status tracking

**Super Administrator User Journey:**
1. Super Admin views the payment status tracking: the payments (the payment, the user, the amount), the statuses (the pending, the successful, the failed), and the dates (the date of the payment); the tracking is explicit.
2. Views the pending payments: the pending (the payment that is in progress, e.g., the gateway is processing); the pending is the in-progress.
3. Views the successful payments: the successful (the payment that is completed, e.g., the amount is received); the successful is the done.
4. Views the failed payments: the failed (the payment that is failed, e.g., the card is declined); the failed is the error.
5. The statuses are visible: the payments, the statuses, the period, so the tracking is complete.
6. For a payment (a specific payment), Super Admin views the payment's status (the status, the date, the reason); the status is the detail.
7. Exports the statuses (the status report, the period); the export is the record.
8. The payment status tracking is audit-logged with the payment, the status, and the timestamp.

**Rules & Edge Cases:**
- The payment status is the state (the pending, the successful, the failed); the status is the control.
- The pending payment is the in-progress (the payment that is in progress, e.g., the gateway is processing); the pending is the state.
- The successful payment is the done (the payment that is completed, e.g., the amount is received); the successful is the state.
- The failed payment is the error (the payment that is failed, e.g., the card is declined); the failed is the state.
- The statuses are visible (the payments, the statuses, the period); the tracking is managed.
- Payment status tracking is audit-logged with the payment, status, and timestamp.

### 2.3 Failed Payment Retry Logic
**What it does:** Handles the failed payment retry logic: the retry of the failed payments (the retry, the attempt, the notification) is handled, so the failed payments are retried (the retry is the recovery). The Super Administrator configures the retry logic (the retry count, the interval, the notification) so the retries are structured and the logic is explicit.

**Sub-features:**
- Retry configuration: the configuration (the retry count, the interval, the notification)
- Retry attempt: the attempt (the retry of the failed payment, the attempt number)
- Retry interval: the interval (the interval between the retries, e.g., the daily)
- Retry notification: the notification (the notification to the user, the retry)
- Retry record: the record (the payment, the retry, the attempt, the date)
- Retry view: the view (the retries, the period)
- Audit logging of the retry configuration and the attempts

**Super Administrator User Journey:**
1. Super Admin configures the retry logic: the retry count (the number of retries, e.g., 3), the interval (the interval between the retries, e.g., the daily), and the notification (the notification to the user, the retry); the logic is explicit.
2. Sets the retry count: the count (the number of retries, e.g., 3); the count is the limit.
3. Sets the retry interval: the interval (the interval between the retries, e.g., the daily); the interval is the timing.
4. Sets the retry notification: the notification (the notification to the user, the retry); the notification is the communication.
5. Saves; the retry logic is live, and the failed payments are retried.
6. A payment fails; the retry is attempted (the retry is made, the attempt is recorded, the user is notified); the retry is the recovery.
7. For a logic change (the count, the interval, the notification updated), Super Admin changes the logic (the new count, the new interval, the new notification, the time); the change is recorded.
8. The retry configuration and the attempts are audit-logged with the payment, the retry, and the timestamp.

**Rules & Edge Cases:**
- The retry configuration is the control (the retry count, the interval, the notification); the configuration is the logic.
- The retry attempt is the recovery (the retry of the failed payment, the attempt number); the attempt is the action.
- The retry interval is the timing (the interval between the retries, e.g., the daily); the interval is the schedule.
- A logic change (the count, the interval, the notification updated) is recorded (the new count, the new interval, the new notification, the time); it is auditable.
- The retries are visible (the retries, the period); the logic is managed.
- Retry configuration and attempts are audit-logged with the payment, retry, and timestamp.
