TICKIT-12: Financial Reconciliation: Sales to Payout Settlement
Track: TICKIT Marketplace • Difficulty: Advanced • Mastery Points: 200 PTS
Business Problem Scenario
TICKIT's finance operations team reported an accounting discrepancy between settled ticket transaction amounts recorded in gold.fact_sales and actual merchant disbursements recorded in raw.payout. Every ticket sale includes seller payout and platform fees (seller_payout + platform_fee). Any transaction where settled gross sales does not balance to payout disbursements represents commission leakage or payment processor reconciliation failure.
Engineering Objective
Write a financial reconciliation query joining gold.fact_sales s to raw.payout p on salesid. • Expected Columns: gross_sales, gross_payout_settlement, reconciliation_difference, commission_leakage_count • Pre-Aggregation Note: To prevent fan-out when multiple payout tranches exist per sale, payouts should be aggregated to salesid grain before calculating final variance. • Reconciliation Math: - gross_sales = sum(s.pricepaid) - gross_payout_settlement = sum(p.seller_payout + p.platform_fee) - reconciliation_difference = sum(s.pricepaid) - sum(p.seller_payout + p.platform_fee) - commission_leakage_count = sum(CASE WHEN s.pricepaid <> (p.seller_payout + p.platform_fee) THEN 1 ELSE 0 END) Key Concepts: - Financial Reconciliation: Proving complete ledger balance between marketplace sales and bank disbursements.
Target Table: gold.fact_sales s (salesid INT, pricepaid DECIMAL(10,2), commission DECIMAL(10,2)), raw.payout p (salesid INT, seller_payout DECIMAL(10,2), platform_fee DECIMAL(10,2), payout_date DATE)
Verification & Architecture Insights
Automated ledger reconciliation detects fee slippage, unauthorized refunds, and currency conversion discrepancies before month-end financial close.