Skip to main content

Reserves and Negative Balances

Last Updated: 2026-12-01 Status: Complete

A rolling reserve is a held portion of a sub-merchant's funds, and a negative balance is what remains when the platform has paid out more than the merchant is owed. This page covers the engineering of both: reserve data model and release jobs, and a recovery waterfall for negative balances. Reserve policy (how much, for how long, for which risk level) is in Reserve Management and is not repeated here.

Quick Reference​

ConceptEngineering meaning
Rolling reserveWithhold a percentage of each settlement; each hold creates a release record with release_at
Fixed reserveA target amount, funded upfront or withheld until the target is met
Capped reserveRolling until a cap is reached, then withholding stops
Terms changesVersioned, effective-dated, applied prospectively
Negative balanceNever silently ignored: recover in a defined order, then escalate
Time-Sensitive

Vendor behaviors below (Stripe, Adyen) are examples taken from their documentation and can change. Confirm liability and reserve-holding arrangements with your sponsor bank agreement and legal counsel.

How Do You Model Reserve Types as Mechanics?​

TypeFundingRelease
RollingPercentage of each settlementEach hold released at its own release_at by a scheduled job
FixedUpfront deposit, or withholding until target reachedOn a date, on an event (for example account closure plus a dispute window) or manually
CappedRolling until total held equals the capAs rolling, and holds resume if the held total falls below the cap

All three reduce to the same primitives: a policy that decides how much to hold, a hold record, and a release record. The base for the percentage (gross sales or net after refunds) is a contract term; see the worked example in Payout Architecture.

Data Model​

CREATE TABLE reserve_policy (
id uuid PRIMARY KEY,
merchant_id uuid NOT NULL,
version int NOT NULL,
type text NOT NULL, -- rolling | fixed | capped
rate_bps int, -- basis points, rolling and capped
base text NOT NULL, -- gross_sales | net_sales
target_minor bigint, -- fixed target
cap_minor bigint, -- capped limit
hold_days int, -- release delay, from contract
effective_from timestamptz NOT NULL,
effective_to timestamptz,
UNIQUE (merchant_id, version)
);
CREATE TABLE reserve_hold (
id uuid PRIMARY KEY,
merchant_id uuid NOT NULL,
policy_id uuid NOT NULL REFERENCES reserve_policy(id),
source_ref text NOT NULL, -- settlement or payout reference
currency char(3) NOT NULL,
amount_minor bigint NOT NULL CHECK (amount_minor > 0),
release_at timestamptz,
status text NOT NULL, -- held | partially_applied | applied | released
UNIQUE (policy_id, source_ref)
);
CREATE TABLE reserve_release (
id uuid PRIMARY KEY,
hold_id uuid NOT NULL REFERENCES reserve_hold(id),
amount_minor bigint NOT NULL CHECK (amount_minor > 0),
reason text NOT NULL, -- scheduled | early | applied_to_loss | termination
approved_by text,
released_at timestamptz NOT NULL
);

Ledger entries: a hold debits the sub-merchant payable and credits the reserve payable; a release does the opposite. Reserve payable stays a liability to the merchant, so total merchant funds are conserved. See Double-Entry Ledger and the reserved balance in Balances.

Who holds the funds?

Who physically holds reserve funds (the sponsor bank, the PayFac, or both) depends on the sponsor agreement. The ledger tracks the obligation to the merchant either way; the bank account that backs it is a treasury decision. See Financial Requirements and Sponsor Delegation.

What Happens When Terms Change?​

  • Mid-stream changes: insert a new reserve_policy version with effective_from; never update the old row. The new policy applies prospectively to settlements after that instant. Existing holds keep their original release_at unless a documented rule or approval says otherwise.
  • Early release: a reserve_release with reason early, an approver and a ledger entry. Require two-person approval for large amounts (set the threshold from your own risk appetite).
  • Applying reserves to losses: when a chargeback or negative balance exceeds the payable, apply held reserve with reason applied_to_loss (a partial amount is allowed) and set the hold to partially_applied, or applied once fully consumed. The entry debits reserve payable and credits the sub-merchant payable.
  • Termination: stop new holds, keep existing holds until the exposure window your contract defines has passed (chargebacks can arrive well after the last sale), then release the remainder and pay it out.

Scheduled Release Job​

@Injectable()
export class ReserveReleaseJob {
constructor(private readonly dataSource: DataSource, private readonly ledger: LedgerService) {}

@Cron(CronExpression.EVERY_HOUR)
async run(): Promise<void> {
const due = await this.dataSource.getRepository(ReserveHold).find({
where: { status: ReserveStatus.Held, releaseAt: LessThanOrEqual(new Date()) },
take: 500,
});
for (const hold of due) {
await this.dataSource.transaction(async (m) => {
const locked = await m.findOne(ReserveHold, {
where: { id: hold.id }, lock: { mode: 'pessimistic_write' },
});
if (!locked || ![ReserveStatus.Held, ReserveStatus.PartiallyApplied].includes(locked.status)) return;
if (await this.hasOpenLiability(m, locked.merchantId)) return; // negative balance? skip
// remaining = amount_minor - sum(reserve_release rows: releases and applications)
const remaining = locked.amountMinor - (await this.sumReleases(m, locked.id));
if (remaining <= 0n) return;
await this.ledger.post(m, releaseEntries(locked, remaining));
await m.save(ReserveRelease, { holdId: locked.id, amountMinor: remaining, reason: 'scheduled' });
await m.update(ReserveHold, locked.id, { status: ReserveStatus.Released });
});
}
}
}

The status check under a row lock makes reruns safe. A hold's status is held, partially_applied (some of it applied to losses), applied (fully consumed) or released; the amount still held is always amount_minor minus the sum of its reserve_release rows, whatever the reason. Skipping holds for merchants with open liabilities keeps the reserve available to cover them; a refinement is to apply the hold to the liability first and release only the surplus.

How Do Negative Balances Arise?​

CauseExample
Refunds exceeding salesMerchant refunds more than it processed since the last payout
ChargebacksDispute debit arrives after payout; see Chargeback Lifecycle
FeesMonthly or event fees exceed available balance
Returned recovery debitAn ACH debit used for recovery is returned (for example R01) after the payable was already credited

Recovery Waterfall​

The order is a policy choice; this is a common one because it uses money you already control first. Rules to enforce:

  • The debit step needs a valid authorization on file. Keep authorization records for the period the rules require (Two years from the termination or revocation of the authorization) and confirm the language with legal counsel and your ODFI.
  • Cap debit attempts and pause payouts when the cap is reached. Stripe documents a maximum number of debit attempts, after which it pauses payouts (vendor example).
  • Write-off is an expense entry (debit loss expense, credit the payable) that requires approval and a reason; it is never an edit of earlier entries.

Who Bears the Loss?​

Liability is a contract and product decision. Stripe Connect exposes it per account (controller.losses.payments set to stripe or application); for platform-liable accounts Stripe may hold a reserve on the platform balance, and per its documentation a collection transfer from the platform clears a balance that stays negative for 180 days. In Adyen for Platforms, the platform's liable balance account can be debited when user balances go negative. Model liability as a field per sub-merchant (loss_bearer: platform, payfac, sponsor_bank, merchant_only) so recovery code knows which ledger account absorbs a write-off. Your actual allocation among platform, PayFac and sponsor is set by your agreements.

What Should a Refund Do When the Balance Is Insufficient?​

OptionEffectRisk
Fund from platformRefund proceeds; merchant balance goes negativePlatform credit exposure
BlockRefund rejected with a clear errorCustomer harm, support load
Allow negativeSame as funding, with a limitNeeds per-merchant exposure caps

Choose per risk tier and make it a policy field rather than code. Always cap the allowed negative amount.

Monitoring Exposure​

Alert on total negative balance by merchant and in aggregate, age of each negative balance, number of failed debit attempts and reserve coverage ratio. Set thresholds from your own baseline. Tie alerts to merchant-level actions (hold payouts, tighten reserve, review) described in Ongoing Monitoring.

Worked Example: Recovering a Negative Balance​

A merchant has a payable of $300. A $800 refund is processed. Later $200 of new sales settle, $100 of reserve is held, and the rest is collected by ACH debit.

StepDebitCreditAmountPayable after
RefundSub-merchant payableSettlement cash800-500
New sales settleSettlement cashSub-merchant payable200-300
Apply reserveReserve payableSub-merchant payable100-200
ACH debit receivedSettlement cashSub-merchant payable2000

A negative payable is an amount the merchant owes. If the debit failed and collections gave up, the final entry would be: debit loss expense, credit sub-merchant payable, 200.

@Injectable()
export class NegativeBalanceRecoveryService {
constructor(private readonly dataSource: DataSource, private readonly ledger: LedgerService) {}

async recover(merchantId: string, currency: string): Promise<void> {
await this.dataSource.transaction(async (m) => {
let owed = -(await this.ledger.payableBalance(m, merchantId, currency)); // lock the account
if (owed <= 0n) return;
owed -= await this.applyReserve(m, merchantId, currency, owed);
if (owed > 0n) {
await m.save(RecoveryCase, {
merchantId, currency, amountMinor: owed.toString(),
step: RecoveryStep.AchDebit, // next steps run asynchronously with retry caps
});
}
});
}
// applyReserve posts reserve-payable to sub-merchant-payable entries and returns the amount used
}

With a derived payable balance, netting happens automatically because a negative payable reduces the next positive balance. Do not subtract it again in the payout calculator (set negativeOffset to 0); see Payout Architecture.

recover() can run repeatedly, so enforce one open case per merchant and currency and upsert into it:

CREATE UNIQUE INDEX recovery_case_one_open
ON recovery_case (merchant_id, currency) WHERE status = 'open';
-- INSERT ... ON CONFLICT (merchant_id, currency) WHERE status = 'open'
-- DO UPDATE SET amount_minor = EXCLUDED.amount_minor

In the service, replace m.save(RecoveryCase, ...) with that upsert (for example m.upsert with a raw ON CONFLICT clause, or createQueryBuilder().insert().orUpdate(...)), so a second call updates the amount instead of opening a duplicate case.

References​

Share: