Skip to main content

Payout Architecture

Last Updated: 2026-12-01 Status: Complete

Payout architecture is the part of a PayFac platform that turns money the acquirer has deposited in aggregate into correct, traceable payouts to each sub-merchant. After reading this page you will be able to design the payout calculation, the schedule model, the split-funding ledger entries, the rail choice and the failure handling for returned payouts.

Quick Reference​

TopicRule of thumb
Funding timeA contract and risk decision, never a constant. Store a schedule per merchant.
Moneybigint minor units per currency. Never floating point.
IdempotencyScheduled payouts: payout_{merchantId}_{currency}_{payoutDate}, enforced by a unique constraint. Manual or instant payouts use the caller's request key.
Same Day ACH limit$1 million per payment
RTP limit$10 million
FedNow limit$10 million network maximum (participants set their own limit; default $100,000)
ACH return timeframeTwo banking days from the settlement date (unauthorized consumer debits allow longer)
Time-Sensitive

Rail limits, return timeframes and vendor behaviors on this page change. Values rendered from the fact registry are listed on Key Numbers. Confirm Nacha rule details with your ODFI or sponsor bank.

What Is the Funds Flow Behind a Payout?​

Under card network rules the acquirer is responsible for paying merchants. An acquirer may pay a payment facilitator on behalf of its sponsored merchants, and the PayFac must then pay those merchants promptly. The sponsor agreement sets the detail: which account receives the funds (a settlement or for-benefit-of account), who holds reserves and what timing applies. See Sponsor Delegation and Financial Requirements.

The invariant from Module 4 still holds: the aggregate deposit must be explainable as the sum of per-sub-merchant allocations plus PayFac revenue. The ledger, not the bank, is the system of record for who is owed what. See Double-Entry Ledger and Balances.

Net vs Gross: What Does the Merchant See?​

Module 4 defines net and gross funding. From the merchant's point of view:

  • Net payout: one deposit equals sales minus refunds, fees, reserve and recoveries. Merchants need a payout report that decomposes it line by line, or support tickets follow.
  • Gross payout: the deposit equals sales (less refunds). Fees are collected separately by debit or invoice, so the platform carries a fee receivable and a second cash flow.

Store the choice per merchant (or per pricing plan) and make the payout calculator branch on it. Never infer it from behavior.

How Do You Design Payout Schedules?​

Model the schedule as data:

FieldPurpose
intervaldaily, weekly, monthly or manual
anchorWeekday or day of month for weekly and monthly
delay_daysBanking days between funds becoming available and payout
minimum_amountPer currency, in minor units. Below it, the balance rolls forward.
rail_preferenceDefault rail and allowed fallbacks
timezoneMerchant business day for cutoffs

Stripe documents the same four intervals (manual, daily, weekly, monthly) for connected accounts, as a vendor example. Compute the next payout date from a banking-day calendar (weekends and Federal Reserve holidays for ACH), and treat "available" as a ledger state, not a date you assume. Do not hardcode T+N anywhere. See Balances for available vs pending.

How Do You Calculate a Payout?​

Inputs: available balance per currency (the payable balance before any recovery), reserve requirements, negative-balance offsets, holds (risk, dispute, compliance), minimum payout amount and any payout fee. Outputs: the payout amount, the ledger entries and a payout record in scheduled state.

Keep the calculation a pure function and put the side effects in a transactional service. If your ledger already nets recoveries into the payable, set negativeOffset to 0 to avoid subtracting it twice.

export interface PayoutInputs {
available: bigint; holds: bigint; negativeOffset: bigint;
reserveShortfall: bigint; payoutFee: bigint; minimum: bigint;
}

@Injectable()
export class PayoutCalculator {
calculate(i: PayoutInputs): bigint {
const amount =
i.available - i.holds - i.negativeOffset - i.reserveShortfall - i.payoutFee;
return amount >= i.minimum && amount > 0n ? amount : 0n;
}
}

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

async runFor(merchantId: string, currency: string, payoutDate: string) {
const key = `payout_${merchantId}_${currency}_${payoutDate}`;
await this.dataSource.transaction(async (manager) => {
const inputs = await this.loadInputs(manager, merchantId, currency); // locks balance rows
const amount = this.calculator.calculate(inputs);
if (amount === 0n) return;
// INSERT ... ON CONFLICT (idempotency_key) DO NOTHING RETURNING id
const payout = await this.insertIfAbsent(manager, {
merchantId, currency, amount, status: PayoutStatus.Scheduled, idempotencyKey: key,
});
if (!payout) return; // a previous run already created it
await this.ledger.post(manager, buildPayoutEntries(payout, inputs));
await this.outbox.add(manager, 'payout.submit', { payoutId: payout.id });
});
}
}

The key extends the payout_{merchantId}_{date}_{sequence} shape from the blog post with the currency; without it a merchant's USD and EUR payouts on the same day would collide. One key per merchant, currency and payout date means a rerun of the same schedule reuses it. Manual or instant payouts use the caller's request key instead. The unique constraint prevents a race between two job runs; use ON CONFLICT DO NOTHING (or catch the unique violation, SQLSTATE 23505) so a duplicate skips one payout instead of failing the whole run.

Creating the payout posts the ledger entries (debit sub-merchant payable, credit payout clearing). Submission to the rail is a separate step fed by the outbox row, and a sweeper resubmits scheduled payouts older than your threshold, so a crash between commit and submit does not strand funds. This follows Idempotency in Payments: the key is tied to business intent and stops at your own boundary. When you send the file or API call to a bank, uncertainty is resolved with the bank's trace identifiers, not by assuming the key travels with it. See Idempotency and Event-Driven Architecture for the outbox.

Worked Example: Why the Reserve Base Is a Contract Term​

A merchant has $10,000 of sales, $500 of refunds and $200 of platform fees in the period. The contract holds a 10% rolling reserve. The reserve base is a contract term; the two readings give different payouts:

Reserve baseReservePayout
Gross sales ($10,000)$1,00010,000 - 500 - 200 - 1,000 = $8,300
Net sales after refunds ($9,500)$95010,000 - 500 - 200 - 950 = $8,350

Journal entries for the gross-sales reading (US dollars shown for readability; store minor units; settlement cash is simplified to one clearing account):

EventDebitCreditAmount
Sales settledSettlement cashSub-merchant payable10,000
RefundsSub-merchant payableSettlement cash500
FeesSub-merchant payablePlatform fee revenue200
Reserve holdSub-merchant payableReserve payable1,000
PayoutSub-merchant payablePayout clearing8,300

The payable ends at zero: 10,000 - 500 - 200 - 1,000 - 8,300. For the net-sales reading only the reserve line (950) and payout line (8,350) change. Encode the base as a field on the reserve policy (Reserves and Negative Balances) and have the contract, not the developer, choose it. Reserve percentages and holding periods are policy; see Reserve Management.

How Does Split Funding Become Ledger Entries?​

Split funding divides one payment among parties. A $100.00 payment (10,000 minor units) might produce a sub-merchant net, a platform fee and PayFac revenue:

PartyLedger accountExample
Sub-merchantSub-merchant payable9,000
Platform (ISV)Platform fee payable700
PayFacPayFac revenue300

For a marketplace order paid to several sellers, create one payable credit per seller, linked to the same payment and order IDs, and balance the entry against the captured amount. Refunds reverse proportionally using a stated rule (pro rata or seller-first) so reversing entries remain deterministic. Fee computation is in Payment Fee Engine Design; the double-entry mechanics are in Double-Entry Ledger.

Which Payout Rail Should You Use?​

RailSpeedLimitReversible?Use for
ACHBanking daysSame Day ACH: $1 millionReturns possibleDefault scheduled payouts
RTPSeconds, 24/7$10 millionFinal once creditedInstant payouts
FedNowSeconds, 24/7$10 million network maximum (participants set their own limit; default $100,000)Final once creditedInstant payouts (receiver must participate)
WirePer bank cutoffsBank-setRecall is not guaranteedLarge or urgent amounts
Push-to-card (OCT)Per issuer and programNetwork and issuer rulesNot a purchase reversalInstant payout to a debit card

Details: ACH and Nacha, Real-Time Rails and Void vs Reversal vs Refund vs OCT. Build a rail selector as a decision table: amount, currency, merchant preference, destination capability and cost. Instant rails usually cost more, so treat an instant payout as a fee event (Fee Engine).

Payout State Machine and Failure Handling​

A payout moves through scheduled, pending (submitted), in_transit, paid, failed or returned, with canceled allowed from scheduled or pending until the payout is released to the rail (cancellation posts reversing entries). At creation the ledger moves funds from the available payable to payout clearing (in transit); paid clears payout clearing against cash. The full transition table is in State Machines. The failure rules to design:

  • Failed before send: reverse the ledger entries so the balance returns to the merchant. Never edit the original entries.
  • Returned after paid: ACH can return a payout after it looks complete. Post a reversing entry that re-credits the sub-merchant payable, set the payout to returned, and block the destination bank account until it is fixed.
  • Return window: return timeframe: Two banking days from the settlement date (unauthorized consumer debits allow longer), so treat ACH paid as provisional. A return also pauses further payouts to that merchant until the destination is resolved.
CodeMeaningTypical action
R01Insufficient fundsRare for credits; investigate the origination account
R02Account closedBlock destination, request new account
R03No account or unable to locateBlock destination, request verification
R04Invalid account number structureBlock, ask merchant to correct
R16Account frozen or returned per OFAC instructionHold, escalate to compliance
R20Non-transaction accountBlock, request a different account

Notifications of Change. A NOC (C01 incorrect account number, C02 incorrect routing number) tells you the correct data. The originator must apply it: Make the requested change within six banking days of receiving the NOC, or before initiating another entry to that account. Automate it, record who and what changed, and keep an audit entry.

Bank account verification before the first payout, with trade-offs:

Which method you require is a risk decision with your sponsor bank. The ACH return-rate thresholds are on Key Numbers.

Multi-currency payouts. Payout per currency from a per-currency balance. Convert only with an explicit FX entry; do not net currencies. Read minor-unit exponents from ISO 4217; some currencies have zero or three decimals. See Balances.

How Do You Reconcile Payouts to the Bank?​

Each submitted payout stores the bank's trace number (ACH) or reference (wire, RTP, FedNow) when known. Daily, match bank statement lines to payouts by trace and amount, post the bank-side cash entry, clear the payout clearing account to zero, and raise an exception for anything unmatched: a payout with no statement line, a line with no payout, or a return. A nonzero payout clearing account is a signal of a missing, late or incorrect event. Matching keys and break handling are in Reconciliation; ledger-side checks are in Ledger Reconciliation.

References​

Share: