Commits the per-withdrawal redemptions of a Metcap ACH-credit batch against its single settlement bank debit.
Callers pass the complete filed set — every redemption for the
batch's withdrawals, any status. Metcap debits the batch gross, so the
amount check sums the whole set: a redemption VOIDED by an in-window
return still counts toward the sum (its return posts as a separate
out-and-back credit) but is never committed. COMMITTED rows from a prior
partial run stay in the sum too, so retries converge; only the
still-PENDING subset is (re)committed. The reconciliation record
(REDEMPTION_IDS / WITHDRAWAL_IDS) is written last and covers the
whole filed set — so a retry after an all-committed-but-unrecorded run
still converges.
Commits run sequentially: every redemption debits the same pending ledger account, so we avoid concurrent on-chain movements from one source.
Reconciles a pending redemption against a posted bank transaction: validates amounts, commits the redemption workflow, and records the reconciliation on the bank transaction.
Lives in
withdrawal-services(notredemption-services) because the logic requiresBankTransactionService, and a direct dependency fromredemption-servicesontobank-transaction-serviceswould close a package cycle viavirtual-account-services.