The Platform Refund Ledger

Appendix D · The worked-example workbook

The Platform Refund Ledger · 4 min read

Every calculation in this book, restated as blank templates. Copy each table into a spreadsheet; the example row shows the arithmetic filled in, and the formulas are written to be typed as-is (amounts in minor units, formatted as currency at display). Formulas assume the column layout given.

D1 · Expected reversal (per charge)

Formula: Expected = ROUND( MIN(total_refunded, charge_amount) ÷ charge_amount × transfer_amount , 0 ) · Missing = MAX(0, Expected − amount_reversed)

ChargeCharge amountTransfer amountTotal refundedExpectedAmount reversedMissingWithin tolerance?
ch_102 (example)800072002000=ROUND(MIN(D,B)/BC,0) → 1800*1350=MAX(0,E−F) → 450no — finding

Tolerance: findings smaller than two minor units per charge are rounding drift (chapter 6), not leaks.

D2 · Expected fee return (per application fee)

Formula: Expected fee refund = ROUND( total_refunded ÷ charge_amount × application_fee_amount , 0 ) · Missing = MAX(0, Expected − fee.amount_refunded)

FeeFee amountCharge amountTotal refundedExpected refundActual refundedMissing
fee_103 (example)60060003000→ 3000→ 300

D3 · Refund episode ledger (who paid?)

List every leg of the episode and sum the platform column. If the sum surprises you, chapter 2's matrix says which default you are living in.

LegAccount debitedAccount creditedPlatform effect
Buyer refund
Transfer reversal
Fee returned
Episode sum

Example (chapter 4's middle column): −100.00 + 90.00 + 0 = −10.00 for the episode, against the $25.00 fee withheld at sale — leaving +$15.00 lifetime, exactly 10% of the $150.00 the buyer kept. The reversal is 90.00, not 100.00, because it is proportional to the transfer and the transfer was the charge less the fee.

D4 · Dispute recovery (per closed-lost dispute)

Formula: Recovery due = transfer.amount − amount_reversed — never the disputed amount, never including the dispute fee. On chapter 5's example the disputed amount is 86000 while the transfer was only 73100 (86000 − 12900, the charge less the withheld fee); asking for 86000 fails.

DisputeStatusTransfer amountAmount reversedRecovery dueReversed after closeNet outstanding
dp_104 (example)lost731000→ 731000→ 73100

D5 · Net position roll-up (per quarter)

Formula: Net position on a sale episode = fee withheld − amount refunded + amount reversed − fees returned ± dispute legs. Restated for the four common endings, worked on the book's $120.00 destination charge with a $12.00 fee — so a $108.00 transfer:

EndingComputationOn the running example
Full default refund, destinationfee withheld − amount refunded12 − 120 = −108.00
Full refund, reverse_transfer onlyfee withheld − refund + reversal12 − 120 + 108 = 0.00
Full refund, both flagsas above, less the fee returned0 − 12 = −12.00
Lost dispute, no clawbackfee withheld − disputed amount − dispute fee129 − 860 − 15 = −746.00 (ch. 5)

Fill one line per ending with your own quarter's counts and per-case amounts:

EndingCountAverage platform effectQuarter total

D6 · Month-close identity

Formula: Σ charges − Σ refunds − Σ stripe_fees ± Σ adjustments = Σ payouts out + (closing balance held − opening balance held)

MonthChargesRefundsStripe feesAdjustmentsPayoutsΔ balance heldIdentity residual
must be zero

A nonzero residual means either an object class missing from the pull or money nobody can name (chapter 9). Both stop the close.