Exactly how every section of the dashboard selects rows and computes its figures. Every number on the dashboard links to its evidence rows; this page is the logic those selections follow. Config: GST rate 18% (inclusive) · deferral period 91 days · deferral threshold ₹249.
Merchant Reference Id (report files overlap at their date boundaries)Order Creation Date (client rule 13-Aug), falling back to Transaction Date where blank — the two differ only at midnight boundaries (~1% of rows). Parsed per-row (format="mixed", dayfirst=True — one May file uses DD-MM-YYYY while all others are ISO)entity_id, keeping the settled = 1 version of a payment when it appears in two windowscreated_at truncated to a date, no timezone shift (client rule 13-Aug; matches their workings, which map all evening timestamps to the same date). A +5:30 shift was trialled and reverted — the config constant RZ_TZ_SHIFT_MIN records the decisionPlayApps_2026MM) rows with Transaction Type = Charge; fee = paired Google fee row (matched on order number)| Figure | Rows selected | Calculation |
|---|---|---|
| Transactions (net) | successful charges of the month + that month's refund rows (negative) | Σ amount − Σ refunds; Taxable = net ÷ 1.18; GST = net − taxable |
| Settlement (net received) | PhonePe: all settlement-report rows of the settlement month (payments + refund reversals + fee lines) · Razorpay: the month's payments' credit − debit · Google: monthly payout composition | PhonePe Σ(Amount + Fee + IGST + CGST + SGST) · Razorpay Σ net_received · Google charges + refunds + fees + fee reversals + tax rows |
| Commission | fee lines by transaction date (see §4) | Σ(Fee + GST-on-fee) of lines whose TransactionDate falls in the month |
| Difference | — | TxnNet − SettlementNet − Commission |
| o/w timing & refund recovery | — | settled-next-month + unsettled − prior-month-spill-in − refunds-dated + refunds-recovered + (fees-deducted-in-month − fees-txn-basis) |
| Unexplained | — | Difference − timing; must be 0 (proven on all 9 gateway-months) |
Merchant Reference Id (PhonePe) is found among PaymentType = PAYMENT rows of the Merchant_Settlement_Report / SETTLEMENT_REPORT chunks; Razorpay: payment row has settled = 1|settled amount − txn amount| > ₹0.01 · Razorpay |amount − fee − (credit − debit)| > ₹0.01 (₹1 tokens: fee ₹2.36 > amount, recovered via debit — not a mismatch)phonepe_gaps.csv)Settlement Month; settled cells use the settlement-report amounts (only the unsettled column uses transaction amounts); each cell is net of refunds where refund's Original Month = cohort and refund month = the column month(Settlement Date, Bank UTR) → net amount (PhonePe); Razorpay type = settlement transfer rows; Google Play monthly payout (~15th next month)automation/deferral_config.json (amount → days; currently all plans 91 days / quarterly; set 30 for a monthly plan and re-run), inclusive of the transaction date (end = date + days − 1)= amount ÷ 1.18 (GST is never deferred — it is output liability at collection)per-day = taxable ÷ 91 recognized(M) = per-day × (days of [date, date+90] falling inside month M) deferred(M-end)= taxable − Σ recognized to date
closing = opening + (collected − recognized-from-current) − released-from-priorCreationDate (fallback TransactionDate), not the settlement dateFee/IGST/CGST/SGST — instruments MANDATE_FEE and UPI_MANDATE_REGISTRATION, bifurcated by instrument in the derivation table. Commission = Σ Fee + Σ(IGST+CGST+SGST). March-dated lines billed in April are shown as prior-period and excluded from Apr–Juldeferral_config.json) whose cells drill to evidence; any other selection is a clearly-labelled what-if view recomputed from per-amount recognition splits (same per-transaction 2dp rounding). To change the BOOKED basis, edit deferral_config.json and re-run.Merchant_Settlement_Report for some months (Apr, Jun) and 5-day SETTLEMENT_REPORT window pulls for others (May, Jul). Same columns, same treatment — derivation rows are labelled with their source format only for traceability.Finwert/Bills/, Apr–Jul) are extracted into gateway_bills.json and reconciled against the computed commission both in the commission table (Billed and Δ columns) and in the dashboard's bill-matching table. PhonePe and Razorpay invoices carry 18% IGST on the fee; Google bills carry no GST (import of services — 18% RCM IGST self-assessed). Google's Jun-26 bill line says "May-26" — a description typo; Bill# and date are Junefee column (includes GST) plus the fee charged on refund rows (Razorpay debits ₹9.43 + GST alongside each refund); tax column = the GST part; net-of-GST fee = fee − taxfees deducted in month = settled gross + refunds recovered − net credited — matches to the paisa for all months (Google: pending payout report)= fee incl GST ÷ collections net of refundsAmounts are GST-inclusive @18%: taxable = amount × 100 ÷ 118 GST = amount × 18 ÷ 118 (= amount − taxable)
raw rows → less FAILED/PENDING/other → less duplicate ids → less non-payment rows (Razorpay) → less out-of-period → used in workingsverify_rows.py rescans the raw files rather than trusting the pipelineCGST = SGST = GST ÷ 2; every other state → IGST = GST| Ratio | Formula |
|---|---|
| Avg ticket (paid) | Σ amount ÷ count over PhonePe+Razorpay charges with amount > ₹1 |
| ₹1-token share | count(amount ≤ ₹1) ÷ total count (PhonePe+Razorpay) |
| Refund rate | Σ refunds ÷ Σ gross collections |
| Commission % | |fees| ÷ gross collections per gateway |
| Top-3 state share | Σ top-3 states' gross ÷ Σ all states' gross |
= (day gross − centred 7-day median) ÷ median= settled next calendar day ÷ settled| # | Rule | Threshold | Meaning |
|---|---|---|---|
| 1 | Daily gross deviation | |Dev%| > 40% vs trailing 7-day median | possible outage / campaign / data gap that day |
| 2 | Refund spike | refunds > 2% of the day's gross | unusual refund activity |
| 3 | Settlement lag | < 95% of a day's PhonePe txns settled T+1 | settlement delay at the gateway |
| 4 | Aged unsettled | unsettled beyond T+2 (excl. month-end tail) | needs a gateway support ticket |
| 5 | Bank mismatch | settlement with no bank credit, or credit with no settlement (from §2 matching) | investigate the specific UTR |
Anything not listed in §10 passed every rule.
On the dashboard, hover any dotted-underlined column header for its definition. Key columns:
| Column | Meaning |
|---|---|
| Txns Gross (before refunds) | Sum of all successful transactions of the month (GST-inclusive), from the transaction reports |
| Refunds | Refunds dated in the month, from refund reports — regardless of when the original sale happened |
| Transactions — net (Gross/Taxable/GST) | Collections minus refunds; Taxable = ÷1.18, GST = the 18/118 part |
| Settlement — net received | Cash that actually reached/reaches the bank: settlement-report net for PhonePe (settlement month), credit−debit for Razorpay, monthly payout for Google |
| Commission (Gross/Taxable/GST) | Gateway fees incl. GST on transaction-date basis; Taxable = the P&L expense; GST = input credit |
| Difference | Transactions(net) − Settlement(net) − Commission — expand ▾ for the reason-by-reason listing |
| o/w timing & refund recovery | The part of the Difference explained by settlement timing, refund recovery and fee-period timing |
| Unexplained | Difference − explained; must be 0 — anything else is a real unreconciled item |
| Settled gross / Unsettled | This month's transactions found / not-yet-found in a settlement report (unsettled = month-end T+1 tail) |
| Value mismatches | Rows present in BOTH reports whose amounts differ; 0 = every matched transaction settled at its exact captured value. Missing rows are counted in Genuine gaps, not here |
| Genuine gaps | Rows on one side only: settled-but-missing-from-txn-report (missing revenue), settled refunds absent from the refund report, refunds never recovered from payouts |
| Settlement-lag matrix | Cohort (txn month) × month it settled; settlement-report amounts, net of the cohort's refunds; with row/column totals |
| Opening / Released / Closing deferred | Roll-forward of unearned revenue: opening + newly deferred − released-to-P&L = closing |
| Fee deducted in month (settlement basis) | What was actually taken out of the month's payouts — differs from txn-basis commission by period timing (e.g. March arrears billed in April) |
| Implied (settled gross − net) | Independent commission check from the settlement report itself; must equal the settlement-basis fee |
| Dev% / % settled T+1 | Day's gross vs trailing 7-day median / share of a day's PhonePe txns settled next day — both exception triggers |
| IGST / CGST / SGST | GSTR-1 split: Maharashtra (incl. unmapped) = CGST+SGST at 9%+9%; every other state = IGST at 18% |
| Bank UTR | Bank reference of the payout the transaction was settled in — the link from gateway data to the bank statement |
Implementation: automation/pipeline.py (all of the above), zoho_bank_reco.py (§2), daily_verification.py (§8–11), verify_rows.py (§6). Every dashboard number's evidence rows: click it, or browse the transaction explorer.