Skip to main content

Function: wiseBatchForBatch()

wiseBatchForBatch(companyId, batchId, params?): Promise<WiseBatchFile | null>

Defined in: src/server/services/wise/batch.ts:38

Build the Wise batch-payment CSV for one pay run, company-scoped. Returns null when the batch is not in the caller's company (the route maps that to 404). Includes every non-failed payment line; the pure builder reports any line that cannot be paid (no recipient on file / non-positive amount) in skipped so the caller can surface it rather than quietly omitting a contractor.

Source funding currency defaults to USD and target payout to PHP (both overridable); amounts are always the exact PHP payout (amountCurrency=target). See ADR-0030.

Parameters

companyId

string

batchId

string

params?

WiseBatchParams = {}

Returns

Promise<WiseBatchFile | null>