Business Domains - Complete Catalog
Part of: MPAC SmartPOS Cloud Platform - Product RequirementsVersion: 2.0 Last Updated: 2026-01-28
Overview
This catalog describes the 12 core business domains that comprise the MPAC SmartPOS platform. Each domain represents a distinct business capability with its own data model, business rules, and API contracts.
Domain Architecture
┌─────────────────────────────────────────────────────────────────┐
│ BUSINESS DOMAINS │
├─────────────────────────────────────────────────────────────────┤
│ │
│ [Identity & Access] ←──→ [Device Management] │
│ ↓ ↓ │
│ [Merchant Hierarchy] ←──→ [Order & Bill] │
│ ↓ ↓ │
│ [Payment Processing] ←──→ [Payment Gateway (mpac-pgw)] │
│ ↓ ↓ │
│ [Customer Management] ←──→ [Loyalty & Coupons] │
│ ↓ ↓ │
│ [Receipt & Invoice] ←──→ [Settlement & Reconciliation] │
│ ↓ ↓ │
│ [App Update Management] ←──→ [Reporting & Analytics] │
│ │
└─────────────────────────────────────────────────────────────────┘Core Domains
1. Identity & Access Management (IAM)
Purpose: Authentication and authorization for humans and devices
Key Capabilities:
- Human identity: Email/password + MFA for portal users
- Device identity: OAuth2 private_key_jwt for terminals
- Role-based access control (RBAC)
- Impersonation with audit logging
- JWT token management (15-min human, 60-120s device)
Owning Service: svc-portal
Related Domains:
- Device Management (device provisioning)
- Merchant Hierarchy (permission scoping)
2. Device Management
Purpose: Lifecycle management of SmartPOS terminals
Key Capabilities:
- Device registration and provisioning
- Hardware inventory tracking
- Remote configuration management
- Device health monitoring
- Activation/deactivation workflows
Owning Service: svc-portal
Related Domains:
- IAM (device authentication)
- App Updates (software deployment)
- Order & Bill (device assignment)
3. Merchant & Store Hierarchy
Purpose: Multi-tenant organizational structure management
Key Capabilities:
- PSP → Merchant → Store hierarchy
- Tenant isolation and data segregation
- Store operational hours management
- Merchant configuration and branding
- Cross-hierarchy reporting
Owning Service: svc-portal
Related Domains:
- IAM (permission boundaries)
- Settlement (payment routing)
- Reporting (aggregated analytics)
4. Order & Bill Management
Purpose: Transaction lifecycle from cart to completed sale
Key Capabilities:
- Order creation and modification
- Bill generation and splitting
- Order status transitions
- Tip handling (fixed/percentage)
- Order cancellation and voiding
Owning Service: svc-smarttab
Related Domains:
- Payment Processing (payment initiation)
- Customer Management (customer association)
- Receipt & Invoice (document generation)
5. Payment Processing
Purpose: Payment method handling and transaction execution
Key Capabilities:
- Multi-payment method support (QR, card, cash, loyalty)
- Split payment handling
- Refund processing (full/partial)
- Payment method configuration
- Transaction settlement
Owning Service: svc-smarttab
Related Domains:
- Payment Gateway (external processing)
- Order & Bill (payment association)
- Settlement (financial reconciliation)
6. Payment Gateway (mpac-pgw)
Purpose: Unified interface to external payment providers
Key Capabilities:
- PaymentIntent abstraction layer
- Provider integration (PromptPay, SCB, KBank, etc.)
- HMAC authentication
- Webhook management
- Idempotency and retry logic
- Rate limiting (1000/min/merchant, 10000/min global)
Owning Service: mpac-pgw (Go/Gin)
Related Domains:
- Payment Processing (upstream consumer)
- Settlement (provider reconciliation)
- External Systems (provider APIs)
7. Customer Management
Purpose: Customer profile and relationship management
Key Capabilities:
- Customer registration and profiles
- Contact information management
- Purchase history tracking
- Customer segmentation
- Privacy and consent management
Owning Service: svc-smarttab
Related Domains:
- Order & Bill (customer association)
- Loyalty & Coupons (program enrollment)
- Reporting (customer analytics)
8. Loyalty & Coupons
Purpose: Customer retention and promotional programs
Key Capabilities:
- Loyalty point accumulation and redemption
- Coupon creation and distribution
- Campaign management
- Discount calculation
- Expiration and validation rules
Owning Service: svc-smarttab
Related Domains:
- Customer Management (enrollment)
- Payment Processing (discount application)
- Order & Bill (promotion tracking)
9. Receipt & Invoice
Purpose: Transaction documentation and compliance
Key Capabilities:
- Receipt generation (thermal/email/SMS)
- Tax invoice creation (VAT compliance)
- Receipt reprinting
- Digital receipt delivery
- Invoice numbering and archival
Owning Service: svc-smarttab
Related Domains:
- Order & Bill (source data)
- Payment Processing (payment details)
- Settlement (audit trail)
10. Settlement & Reconciliation
Purpose: Financial settlement and reporting
Key Capabilities:
- Daily settlement batch processing
- Payment provider reconciliation
- Fee calculation and distribution
- Payout management
- Dispute resolution tracking
Owning Service: svc-smarttab + mpac-pgw
Related Domains:
- Payment Processing (transaction source)
- Payment Gateway (provider data)
- Reporting (financial analytics)
11. App Update Management
Purpose: Software deployment for terminal applications
Key Capabilities:
- APK versioning and storage
- Staged rollout strategies
- Device targeting (by model/store/region)
- Update scheduling
- Rollback capabilities
Owning Service: svc-portal
Related Domains:
- Device Management (target devices)
- Merchant Hierarchy (deployment scoping)
12. Reporting & Analytics
Purpose: Business intelligence and operational insights
Key Capabilities:
- Real-time dashboards
- Transaction analytics
- Device health monitoring
- Financial reporting
- Custom report generation
- Data export (CSV/Excel/PDF)
Owning Service: svc-smarttab (analytics engine)
Related Domains:
- All domains (data aggregation)
- Merchant Hierarchy (report scoping)
Domain Ownership Matrix
| Domain | Primary Service | Database | Key APIs |
|---|---|---|---|
| IAM | svc-portal | PostgreSQL | /auth/user/*, /auth/device/* |
| Device Management | svc-portal | PostgreSQL | /devices/* |
| Merchant Hierarchy | svc-portal | PostgreSQL | /psps/*, /merchants/*, /stores/* |
| Order & Bill | svc-smarttab | PostgreSQL | /orders/*, /bills/* |
| Payment Processing | svc-smarttab | PostgreSQL | /payments/*, /refunds/* |
| Payment Gateway | mpac-pgw | PostgreSQL + Redis | /v1/payment-intents/* |
| Customer | svc-smarttab | PostgreSQL | /customers/* |
| Loyalty & Coupons | svc-smarttab | PostgreSQL | /loyalty/*, /coupons/* |
| Receipt & Invoice | svc-smarttab | PostgreSQL | /receipts/*, /invoices/* |
| Settlement | svc-smarttab + mpac-pgw | PostgreSQL | /settlements/* |
| App Updates | svc-portal | PostgreSQL + S3 | /apps/*, /updates/* |
| Reporting | svc-smarttab | PostgreSQL | /reports/*, /analytics/* |
Cross-Domain Workflows
Payment Flow
[Order & Bill] → [Payment Processing] → [Payment Gateway (mpac-pgw)]
↓ ↓ ↓
[Receipt] [Settlement] [Provider Reconciliation]Device Provisioning Flow
[IAM] → [Device Management] → [Merchant Hierarchy]
↓ ↓ ↓
[Certificates] [Configuration] [Store Assignment]Refund Flow
[Order & Bill] → [Payment Processing] → [Payment Gateway]
↓ ↓ ↓
[Receipt Update] [Settlement Adjustment] [Provider Refund]See Also
Technical Implementation:
- Database Architecture - Domain data models
- Communication Patterns - Inter-domain integration
- Security Architecture - Domain security
API Documentation:
- API Reference - Complete endpoint catalog
- Data Model - ER diagrams
Testing:
- Integration Testing - Cross-domain test scenarios
Navigation: ↑ Back to Index | Master PRD →