Financial Management Functional Requirements
1. Business Context
The Event and Membership Administration System requires financial management capabilities to track payment transactions, reconcile with payment processors, and maintain general ledger records for export to external accounting systems.
1.1. Business Drivers
-
Payment Verification - Confirm orders are correctly marked as paid or unpaid by comparing with payment processor records
-
Fee Tracking - Capture payment processor fees for cost analysis and accurate financial reporting
-
Audit Trail - Maintain complete record of all payment processor transactions
-
GL Integration - Record financial effect of orders for accounting purposes
-
Journal Export - Consolidate transactions for export to external accounting software
-
Delta Tracking - Handle order modifications after transactions have been journaled
1.2. Scope
This requirements document covers:
-
PayFast transaction reconciliation import
-
PayGate transaction reconciliation import
-
General ledger transaction creation from orders
-
Delta handling for post-journal order modifications
-
Journal creation and management
Out of scope:
-
Real-time webhook-based reconciliation
-
Automatic payment status correction (flagging only)
-
UI for reconciliation review
-
External accounting system integration (export only)
2. Payment Reconciliation Requirements
2.1. FR-FM-001: PayFast CSV Import
| ID | FR-FM-001 |
|---|---|
Title |
PayFast Transaction CSV Import |
Priority |
High |
Description |
The system shall import PayFast transaction CSV exports to capture payment records and match them to orders. |
Acceptance Criteria |
|
Related |
2.2. FR-FM-002: PayGate CSV Import
| ID | FR-FM-002 |
|---|---|
Title |
PayGate Transaction CSV Import |
Priority |
High |
Description |
The system shall import PayGate transaction CSV exports to capture payment records and match them to orders. |
Acceptance Criteria |
|
Related |
2.3. FR-FM-003: Order Matching
| ID | FR-FM-003 |
|---|---|
Title |
Reconciliation Order Matching |
Priority |
High |
Description |
The system shall match reconciliation records to orders using merchant reference fields. |
Acceptance Criteria |
|
Notes |
Order ID foreign key constraint intentionally omitted due to legacy data with PostIDs that don’t match current Order IDs. Matching performed at application level. |
2.4. FR-FM-004: Fee Calculation
| ID | FR-FM-004 |
|---|---|
Title |
Payment Processor Fee Calculation |
Priority |
Medium |
Description |
The system shall calculate or capture payment processor fees for each transaction. |
Acceptance Criteria |
|
Fee Formula (PayGate) |
fee = R2.00 + (gross x 3.5%) feeTax = fee x 15% nett = gross - fee - feeTax |
2.5. FR-FM-005: Discrepancy Detection
| ID | FR-FM-005 |
|---|---|
Title |
Payment Discrepancy Detection |
Priority |
Medium |
Description |
The system shall enable detection of discrepancies between orders and payment processor records. |
Acceptance Criteria |
|
Notes |
Automatic status correction is out of scope; system provides data for manual review. |
3. General Ledger Requirements
3.1. FR-FM-010: GL Transaction Creation
| ID | FR-FM-010 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Title |
GL Transaction Creation from Order |
||||||||||||
Priority |
High |
||||||||||||
Description |
The system shall create a GL transaction with corresponding records when an order is paid. |
||||||||||||
Acceptance Criteria |
|
||||||||||||
Record Structure |
|
3.2. FR-FM-011: GL Account Mapping via PaymentProcessor
| ID | FR-FM-011 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Title |
GL Account Mapping via PaymentProcessor |
||||||||||||||||
Priority |
High |
||||||||||||||||
Description |
The system shall derive GL accounts from the PaymentProcessor associated with the Order. All financial postings for an order use accounts configured on the PaymentProcessor. |
||||||||||||||||
Acceptance Criteria |
|
||||||||||||||||
Record Structure |
|
3.3. FR-FM-012: Order-GL Traceability
| ID | FR-FM-012 |
|---|---|
Title |
Order to GL Traceability |
Priority |
High |
Description |
The system shall maintain bidirectional traceability between orders and GL records. |
Acceptance Criteria |
|
3.4. FR-FM-013: Delta Tracking
| ID | FR-FM-013 |
|---|---|
Title |
Post-Journal Delta Tracking |
Priority |
High |
Description |
The system shall track order modifications as delta records when changes occur after journaling. |
Acceptance Criteria |
|
Decision Points |
3.5. FR-FM-014: Journal Creation
| ID | FR-FM-014 |
|---|---|
Title |
Journal Creation for Export |
Priority |
High |
Description |
The system shall support creating journals that consolidate GL transactions for export to accounting software. Flexible filter parameters enable targeted journal creation by date range, registration system, and payment processor. |
Acceptance Criteria |
|
Consolidation |
Multiple order transactions → single journal with aggregated account totals |
Use Cases |
|
3.6. FR-FM-015: Journal Deletion
| ID | FR-FM-015 |
|---|---|
Title |
Journal Deletion (Unwind) |
Priority |
Medium |
Description |
The system shall support deleting a journal, reverting included transactions to their pre-journal state. |
Acceptance Criteria |
|
Constraints |
Only journals that have not been exported to external system should be deleted. |
3.7. FR-FM-016: Steady State Balance
| ID | FR-FM-016 |
|---|---|
Title |
GL Steady State Balance |
Priority |
Medium |
Description |
The system shall maintain GL balance where all accounts net to zero when fully exported. |
Acceptance Criteria |
|
4. Non-Functional Requirements
4.1. NFR-FM-001: Import Performance
| ID | NFR-FM-001 |
|---|---|
Title |
Reconciliation Import Performance |
Description |
Reconciliation imports shall complete in reasonable time for typical file sizes. |
Requirement |
|
4.2. NFR-FM-002: Data Integrity
| ID | NFR-FM-002 |
|---|---|
Title |
Financial Data Integrity |
Description |
Financial records must maintain integrity and consistency. |
Requirement |
|
4.3. NFR-FM-003: Auditability
| ID | NFR-FM-003 |
|---|---|
Title |
Financial Audit Trail |
Description |
All financial operations must be auditable. |
Requirement |
|
4.4. NFR-FM-004: Security
| ID | NFR-FM-004 |
|---|---|
Title |
Financial Data Security |
Description |
Financial data must be protected appropriately. |
Requirement |
|
5. Technology Decisions
The following technology decisions have been made (see design journal for rationale):
| Component | Decision | Rationale |
|---|---|---|
Entity Inheritance |
JPA JOINED strategy |
Clean separation of PayFast and PayGate specific fields |
Discriminator |
2-character codes |
Consistent with existing enum patterns (Gender) |
Money Type |
BigDecimal |
Sufficient precision, no external library dependency |
CSV Parsing |
SuperCSV |
Already used in existing import services |
Import Flow |
Direct import |
Fixed schema from payment processors, no mapping UI needed |
GL Relationship |
GlTransaction owns Order |
FK on gl_transaction.order_id; Order has mappedBy inverse |
GL Account Source |
PaymentProcessor entity |
Accounts (bank, fee, income) derived from Order.paymentProcessor |
Journal Filtering |
Optional multi-criteria |
Flexible consolidation by date, registrationSystem, paymentProcessor |
6. Related Documentation
-
Payment Reconciliation Design - Detailed design and implementation
-
General Ledger Design - GL integration design
-
Financial Management Architecture - High-level architecture
-
Import Process Implementation - Async import patterns