Skip to content

Feat/reports issues 937 940 - #1323

Merged
github-actions[bot] merged 4 commits into
Smartdevs17:mainfrom
Eromosele0110:feat/reports-issues-937-940
Oct 22, 2026
Merged

github-actions[bot] merged 4 commits into
Smartdevs17:mainfrom
Eromosele0110:feat/reports-issues-937-940

Conversation

@Eromosele0110

Copy link
Copy Markdown
Contributor

What this PR does

Changes

  • List of notable files and modules touched (monorepo wiring, Sentry integration, dashboards, etc.)
  • Notes about the Turborepo configuration, shared packages, and ESLint/TS config

Why

  • Rationale for the changes and how they solve the Acceptance Criteria

How to test

  • Steps to reproduce locally, including commands to run build/test
  • Any environment variables needed (e.g., SENTRY_DSN)
  • How to verify the dashboards/alerts configuration (stubs or real)

Notes

… Automated financial statements, payout failure analytics, reconciliation and settlement reports

- Add ReportJob, ReportArchive, SavedReport, ScheduledReport, ReportTemplate models + migration
- Mount reports router at /api/v1/reports
- Smartdevs17#940: financial-statements service (balance/income/cash-flow from payment data)
- Smartdevs17#939: payout-failure-analytics service (failure classification, rates by merchant/asset)
- Smartdevs17#937: reconciliation report routes (POST /reports/reconciliation)
- Smartdevs17#938: merchant settlement reports integrated via financial statements
- Tests for all new services
- ignore jest/vitest and Playwright visual-regression baselines
- ignore coverage, turbo caches, playwright reports and tsbuildinfo
- ignore leftover scratch files (test-write.txt, fix-paths.js, patch.js,
  scaffold.js, issue-64.md, PR_BODY.md, PR_DESCRIPTION.md)
- untrack the committed snapshot PNGs, turbo cookies/logs and scratch files
… financial statements, settlement reports, payout failure analytics and reconciliation

Smartdevs17#940 Automated financial statements
- income statement, balance sheet and cash-flow summary derived from the payment ledger
- refunds and reversals are kept out of revenue, pending/processing become receivables
- platform fee is read from REPORT_PLATFORM_FEE_BPS instead of being hardcoded to zero
- every run is recorded as a ReportJob with a ReportArchive and CSV/PDF export

Smartdevs17#939 Payout failure analytics dashboard
- failure rates are measured against every payout in the window, not only the failures
- failures are classified with the shared failure-analysis engine (root cause, severity, fixes)
- error-code counts are per request, so counts no longer leak between calls
- new dashboard page at /dashboard/payout-failures backed by pure, tested helpers

Smartdevs17#938 Merchant settlement reports
- per-merchant settlement statements: gross collected, refunds, reversals, fees, net settlement, in-flight and failed amounts
- merchants are the settlement account a payment was made to, with userId fallback
- daily and monthly breakdowns plus tenant totals and CSV/PDF export

Smartdevs17#937 Transaction reconciliation report
- every transaction gets a reconciliation status (matched, missing_tx_hash, duplicate_tx_hash, invalid_amount, not_settled)
- reconciles expected settlement against collected amount and reports the outstanding balance
- the reconciliation router is now mounted at /api/v1/reconciliation so the existing dashboard works

Also
- new shared report kit for money maths, period keys, CSV and dependency-free PDF output
- reports router: static paths now resolve before /:id, so the payout-failure endpoint is reachable
- backend: register the default payment providers at startup and drop unused imports
@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

@topboy192 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

@Eromosele0110 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions
github-actions Bot merged commit 4ca2fcd into Smartdevs17:main Oct 22, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants