Rules, filters & calculations

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.

Contents
  1. Row inclusion — which raw rows count at all
  2. §0 Consolidated summary & net difference check
  3. §1 Transaction vs settlement reconciliation
  4. §2 Bank vs settlement reconciliation
  5. §3 Monthly revenue deferral
  6. §4 Commission verification
  7. §5 GST impact
  8. §6 Row-count verification
  9. §7 State-wise reconciliation
  10. §8 Key ratios
  11. §9 Control totals
  12. §10 Exception rules
  13. §11 Sample trace

1 · Row inclusion — which raw rows count at all

PhonePe transactions (FORWARD_TRANSACTION reports)

Razorpay (Combined Reports, csv + xlsx)

Google Play

Refunds

2 · §0 Consolidated summary & net difference check

FigureRows selectedCalculation
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 compositionPhonePe Σ(Amount + Fee + IGST + CGST + SGST) · Razorpay Σ net_received · Google charges + refunds + fees + fee reversals + tax rows
Commissionfee 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)

3 · §1 Transaction vs settlement reconciliation

4 · §2 Bank vs settlement reconciliation

5 · §3 Monthly revenue deferral

per-day        = taxable ÷ 91
recognized(M)  = per-day × (days of [date, date+90] falling inside month M)
deferred(M-end)= taxable − Σ recognized to date

6 · §4 Commission verification

7 · §5 GST impact

Amounts are GST-inclusive @18%:
taxable = amount × 100 ÷ 118
GST     = amount × 18 ÷ 118 (= amount − taxable)

8 · §6 Row-count verification

9 · §7 State-wise reconciliation

10 · §8 Key ratios

RatioFormula
Avg ticket (paid)Σ amount ÷ count over PhonePe+Razorpay charges with amount > ₹1
₹1-token sharecount(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

11 · §9 Control totals

12 · §10 Exception rules

#RuleThresholdMeaning
1Daily gross deviation|Dev%| > 40% vs trailing 7-day medianpossible outage / campaign / data gap that day
2Refund spikerefunds > 2% of the day's grossunusual refund activity
3Settlement lag< 95% of a day's PhonePe txns settled T+1settlement delay at the gateway
4Aged unsettledunsettled beyond T+2 (excl. month-end tail)needs a gateway support ticket
5Bank mismatchsettlement with no bank credit, or credit with no settlement (from §2 matching)investigate the specific UTR

Anything not listed in §10 passed every rule.

Column glossary

On the dashboard, hover any dotted-underlined column header for its definition. Key columns:

ColumnMeaning
Txns Gross (before refunds)Sum of all successful transactions of the month (GST-inclusive), from the transaction reports
RefundsRefunds 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 receivedCash 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
DifferenceTransactions(net) − Settlement(net) − Commission — expand ▾ for the reason-by-reason listing
o/w timing & refund recoveryThe part of the Difference explained by settlement timing, refund recovery and fee-period timing
UnexplainedDifference − explained; must be 0 — anything else is a real unreconciled item
Settled gross / UnsettledThis month's transactions found / not-yet-found in a settlement report (unsettled = month-end T+1 tail)
Value mismatchesRows 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 gapsRows 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 matrixCohort (txn month) × month it settled; settlement-report amounts, net of the cohort's refunds; with row/column totals
Opening / Released / Closing deferredRoll-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+1Day's gross vs trailing 7-day median / share of a day's PhonePe txns settled next day — both exception triggers
IGST / CGST / SGSTGSTR-1 split: Maharashtra (incl. unmapped) = CGST+SGST at 9%+9%; every other state = IGST at 18%
Bank UTRBank reference of the payout the transaction was settled in — the link from gateway data to the bank statement

13 · §11 Sample trace

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.