Financial Validation
Overview
LoanPilot performs automated financial validation by synthesizing data from multiple sources—Bank Statements, GST Returns, and Financial Statements (P&L/Balance Sheets). This process ensures that the data used for underwriting is mathematically consistent and verified across different reporting formats.
The validation engine uses AI-driven extraction paired with strict schema enforcement (Zod-based) to detect discrepancies, fraud risks, and repayment capacity.
Document-Level Validation
Each financial document undergoes an analysis phase where key metrics are extracted and validated for logical consistency.
Bank Statement Analysis
Validates the cash flow health of the borrower.
- Period Integrity: Ensures the analysis covers the requested start and end dates.
- Balance Validation: Calculates daily balances to identify negative balance trends.
- Fraud Detection: Evaluates
fraud_risk_scorebased on cash deposit percentages and transaction anomalies. - Repayment Capacity: Automatically identifies existing EMIs and calculates the
emi_to_inflow_ratioandnet_disposable_income.
Financial Statement Analysis
Processes Balance Sheets, Profit & Loss statements, and ITRs.
- Mathematical Consistency: Validates that
Total Assets = Total Liabilities + Total Equity. - Ratio Benchmarking: Calculates critical performance indicators:
- Liquidity: Current Ratio, Quick Ratio.
- Solvency: Debt-to-Equity, Debt-to-Assets.
- Profitability: Net Profit Margin, Gross Profit Margin, ROE, ROA.
- Coverage: Debt Service Coverage Ratio (DSCR).
Cross-Document Reconciliation
The Reconciliation engine is the core of the validation layer. it cross-references data between disparate documents to ensure the borrower's reported figures match their actual cash flow.
Key Reconciliation Checks
| Check Type | Logic | | :--- | :--- | | GST vs. Bank | Compares total credits in bank statements against outward supplies reported in GST returns. | | GST vs. P&L | Cross-references annual revenue in the Profit & Loss statement with the sum of GST returns for that fiscal year. | | P&L vs. Bank | Validates reported revenue and operating expenses against actual bank inflows and outflows. |
API Usage
Triggering Analysis
To run a financial validation, POST to the respective analysis endpoint.
Endpoint: POST /api/analyze/financial-statement
Request Body:
{
"documentId": "uuid",
"applicationId": "uuid",
"organizationId": "uuid",
"statementType": "profit_loss", // Options: balance_sheet, profit_loss, itr
"aiProvider": "openai" // Optional
}
Response Schema: The system returns a structured analysis object including calculated ratios and a confidence score:
{
"success": true,
"data": {
"period_year": 2023,
"profit_loss": {
"revenue": 500000,
"net_income": 75000
},
"ratios": {
"net_profit_margin": 15.0,
"current_ratio": 1.8,
"dscr": 2.1
},
"confidence_score": 0.98
}
}
Performing Reconciliation
To trigger the mathematical cross-check between all uploaded and analyzed documents.
Endpoint: POST /api/analyze/reconciliation
Request Body:
{
"applicationId": "uuid"
}
Validation Flags and Confidence Scores
Every validation result is accompanied by metadata that should be reviewed by the underwriter:
- Confidence Score: A float between
0and1representing the AI's certainty in the extracted data. Scores below0.80are typically flagged for manual review. - Fraud Flags: Boolean indicators (e.g.,
has_fraud_flags) triggered by suspicious patterns like high cash-to-revenue ratios or regular round-sum transfers. - Volatility Metrics: The
cashflow_volatilityindex measures the stability of monthly inflows, aiding in risk assessment for seasonal businesses.