Skip to content

feat(server): reconcile Paystack DVA deposits - #596

Open
sa-salami wants to merge 1 commit into
arflexx:mainfrom
sa-salami:fix/issue-492
Open

sa-salami wants to merge 1 commit into
arflexx:mainfrom
sa-salami:fix/issue-492

Conversation

@sa-salami

Copy link
Copy Markdown
Contributor

Summary

  • Schedule read-only virtual-account deposit reconciliation at a configurable interval (default one hour).
  • Fetch active Paystack DVA customer transactions, then compare successful NGN dedicated_nuban payment references and amounts with matching local deposit ledger entries.
  • Log masked account details and structured per-account mismatches, errors, and run totals. Reruns do not write to or credit wallet balances.
  • Add focused coverage for filtering provider transactions, pagination, matching references, tolerance, and interval configuration.

Provider API scope

Paystack's documented customer and transaction endpoints expose DVA activity and customer transactions, but not a current balance for an individual dedicated account. This PR reports missing or inconsistent deposit transactions as the available reconciliation signal; it does not represent that as a running account-balance check.

Validation

  • npm test -- --runTestsByPath src/services/virtualAccount.test.ts src/jobs/virtualAccountReconciliation.test.ts — passed (11 tests).
  • npm run lint remains blocked by existing notification template/type errors in unrelated files.
  • git diff --check and full added-line PolinRider scan — passed.

Refs #492

@sa-salami
sa-salami requested a review from dark-sarge as a code owner October 26, 2026 11:16
@zeemscript

Copy link
Copy Markdown
Contributor

@arflexx I checked this failure against the default-branch CI run 40304749221 (Oct 26): it fails with the same TypeScript errors in server notifications and frontend code. This PR changes virtual-account reconciliation files and does not touch those failing modules. The PR is currently reported mergeable; please rerun CI after the default-branch errors are fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants