Freeze an analysis cutoff before trading. Record every refund event ID, processing date and pretax amount against its original transaction/sale date; cumulative known pretax refunds cannot exceed the original pretax charge. For this consumed-cost analysis, restate the original sale-day revenue and contribution, never also deduct that refund on processing day. Preserve original eligibility, attempts and nonreturned fees. Version amendments and recalculate all eight day totals/quantiles and qualifying paid visits after later refunds; retain prior results and state refunds-known-as-of. This is not a bank-cash calendar.
Transaction amount_before_tax is the original pretax charge. date is its original sale date. original_primary_eligible is fixed by original channel/route/price eligibility, not refund outcome. List each refund event ID, processing date and pretax amount in refund_events_ids_dates_pretax_amounts; known_pretax_refund_total_usd is their cumulative sum as of refunds_known_as_of. Fully refunded orders do not enter diagnostic paid-order counts or qualifying paid visits, but their production attempts and fees stay in primary costs; partial refunds with positive net revenue remain in paid-order diagnostics.
pilot-days.csv primary_attempted_drinks and primary_attempts_by_drink_type mean originally eligible attempts INCLUDING later refunded orders. excluded_attempted_drinks means originally excluded channels/events, never newly excluded refunds. All-channel typed counts contain both. actual_primary_processing_fee_usd includes fees retained on originally eligible refunds. primary_refund_usd_already_deducted is informational: it is already netted in primary_net_pretax_revenue_usd and must not be subtracted again. Record refunds_known_as_of and sale_day_restatement_version on each affected day; no favorable screen with unresolved attribution. Recompute original sale-day totals and all eight-day statistics; processing-day bank cash is a separate ledger.
Fee source: https://squareup.com/help/us/en/article/6116-process-refunds
