How ishwetraj17/payments-and-ledger-engine works
This is a modular fintech billing and payments engine. Its documented financial workflow runs from customer subscription through invoice generation and payment orchestration to double-entry ledger posting, revenue recognition, and reconciliation. Supporting branches include retries, event delivery and replay, risk review, and operational integrity checks. The graph uses README-documented lifecycle links and excerpted source calls; unsampled subsystems are represented at existing directory paths, and their internal wiring is not inferred.
Main entry points: PaymentGatewayCallService.java Payment orchestration · InvoiceService.java Invoice billing · LedgerService.java Double-entry ledger · SubscriptionV2Service.java Subscription lifecycle
Components 20
Subscription and billing
- Customer
src/main/java/com/firstclub/customer - Catalog pricing
src/main/java/com/firstclub/catalog - Subscription lifecycle
src/main/java/com/firstclub/subscription/service/SubscriptionV2Service.java - Invoice billing
src/main/java/com/firstclub/billing/service/InvoiceService.java - Tax calculation
src/main/java/com/firstclub/billing/tax/service/TaxCalculationService.java
Payments and accounting
- Payment orchestration
src/main/java/com/firstclub/payments/gateway/PaymentGatewayCallService.java - Dunning retries
src/main/java/com/firstclub/dunning/service/DunningService.java - Double-entry ledger
src/main/java/com/firstclub/ledger/service/LedgerService.java - Revenue recognition
src/main/java/com/firstclub/ledger/revenue - Gateway reconciliation
src/main/java/com/firstclub/recon/service/ReconciliationService.java
Events and reliability
- Transactional outbox
src/main/java/com/firstclub/outbox/service/OutboxService.java - Event log and replay
src/main/java/com/firstclub/events/replay/EventReplayService.java - Webhook delivery
src/main/java/com/firstclub/payments/webhooks/WebhookDedupService.java
Risk and controls
- Risk scoring
src/main/java/com/firstclub/risk - Manual review
src/main/java/com/firstclub/risk/service/ManualReviewService.java - Integrity checks
src/main/java/com/firstclub/integrity/IntegrityCheckService.java - Financial audit
src/main/java/com/firstclub/audit/service/AuditEntryService.java
Operations and insight
- Admin search
src/main/java/com/firstclub/admin/search/SearchService.java - Operations repair
src/main/java/com/firstclub/ops/repair/ManualRepairService.java
Other components
- Merchant or operator
Connections 20
- Merchant or operator → Customer: enrolls
README.md - Customer → Subscription lifecycle: subscribes
README.md - Catalog pricing → Subscription lifecycle: provides plan
README.md - Subscription lifecycle → Invoice billing: generates invoice
README.md - Invoice billing → Tax calculation: calculates tax
README.md - Invoice billing → Payment orchestration: initiates payment
README.md - Payment orchestration → Double-entry ledger: posts entries
README.md - Double-entry ledger → Revenue recognition: recognizes revenue
README.md - Payment orchestration → Gateway reconciliation: reconciles gateway
README.md - Invoice billing → Transactional outbox: publishes event
src/main/java/com/firstclub/billing/service/InvoiceService.java - Transactional outbox → Event log and replay: delivers events
README.md - Payment orchestration → Dunning retries: retries failures
README.md - Payment orchestration → Webhook delivery: receives callbacks
README.md - Risk scoring → Manual review: opens cases
src/main/java/com/firstclub/risk/service/ManualReviewService.java - Merchant or operator → Manual review: reviews cases
- Merchant or operator → Admin search: searches records
README.md - Merchant or operator → Operations repair: requests repair
README.md - Double-entry ledger → Integrity checks: checks invariants
README.md - Gateway reconciliation → Integrity checks: checks consistency
README.md - Payment orchestration → Financial audit: records operations
README.md