reference
Creator compensation adjustment lines and payout batches
Explicit ledger adjustment lines of confirmed finalize deltas and payout batch draft, approval, external settlement and reconciliation records. No money moves.
FINANCE-01g, after the donor creator platform source @ f4cb617b modules/finance/src/payout-batches.ts and payout-batches-contracts.ts.
adjustment-line.recordturns oneconfirmedfinalize adjustment (accept_delta) into one line per adjustment id. A positive delta is acreditline that needs its own owner approval (adjustment-line.approve, exact amount,confirmed: true); the approval writes one ledger credit (reason: 'adjustment') within the remaining funded exposure of the current reservation. A negative delta is areceivableline recorded for review, never an automatic debit. A zero delta needs no line; an unknown delta is null and cannot be confirmed. Replays by adjustment id are idempotent.payout-batch.preparegroups existing earned obligations by reference, never recreating them. Eligible: credited to the ledger, not held by a live batch and not paid, of the batch unit (and campaign), on acompletedengagement (oractivewhen the host policy allows), with no open dispute and no pending finalize adjustment. Each obligation gets a payout hold that the wallet counts as reserved.payout-batch.approve(owner,confirmed: true) binds the exact obligation ids, item count, total and digest.stripe_connectis unavailable and refused (CREATOR_PAYOUT_ROUTE_UNAVAILABLE); the route stays manualexternal_settlement. Eligibility is re-checked. Approval is not payment.payout-batch.settlement.record(finance) records external settlement evidence references for the exact total. Anunknownoutcome holds the funds: the batch cannot be voided and must be reconciled.payout-batch.reconcile(finance, separate step) matches statement references:settleddebits the ledger once per obligation (reason: 'settlement') and marks the holds paid;not_settledvoids the batch and releases them.payout-batch.voidvoids a draft, an approved batch or a wrongly recorded known settlement; the obligations are owed again. Reconciled and voided batches are terminal.- FINANCE-01h: batches also reference approved adjustment credit lines, an open receivable of the same creator and campaign blocks eligibility, and settlement may be recorded and reconciled per item (see the payout items DocBlock). Whole-batch settlement and reconciliation act on the live items only.
- Every command is serialized on the workspace lock, checked against the batch revision (CAS) and replayed by its command id. Unknown tax stays null. Nothing here transfers money, calls a payment provider or infers escrow.