Function: reconcileWisePayoutsForCompany()
reconcileWisePayoutsForCompany(
companyId):Promise<ReconcileSummary>
Defined in: src/server/services/wise/reconcile.ts:52
Reconcile one company's open payments against the Wise profile's recent transfers. Matches link a transfer to a payment and advance its status (exact, sent → completed; otherwise processing); amount variances are linked but never auto-completed. The full picture (variances + orphan transfers) is snapshotted to settings for the owner to review. Read-mostly: the only writes are payment status/link advances, which the DB payment-lock trigger still guards.
Parameters
companyId
string
Returns
Promise<ReconcileSummary>