SF12 - MicroBiz Loan: AI-Powered Micro Lending for Digital Economy Sellers
Inspiration
Online sellers, freelancers, and gig workers form the backbone of Vietnam's digital economy — yet they are invisible to traditional credit systems. They have no CIC history, no payslips, no tax declarations. When a TikTok Shop seller needs 10M VND to restock before a Mega Sale, banks say "no" because there's no paper trail.
We asked: What if AI could read cash flow patterns the way a CFO reads financial statements?
Shinhan Finance wants to reach this untapped market but lacks credit data. The sellers need capital but have no way to prove trustworthiness. We built SF12 to close this gap — using Qwen AI to transform e-commerce transaction data into actionable credit decisions, creating a win-win: sellers get working capital, banks get loyal customers with NPL <5%.
What it does
SF12 is a "Mini-CFO" (Giám đốc Tài chính bỏ túi) for digital economy sellers:
AI Alternative Credit Scoring — No CIC needed. Qwen AI analyzes 6 months of e-commerce cash flow (Shopee, Lazada, TikTok Shop) and e-wallet data (MoMo, ZaloPay) to produce a 300-850 credit score with explainable reason codes.
Revenue-Based Repayment — Instead of fixed installments, borrowers repay as a % of daily revenue. On slow days, the deduction auto-adjusts down to preserve working capital. On Mega Sale days, it increases to help them pay off early and reduce total fees.
Smart Insights (Predictive Business Intelligence) — AI detects demand peaks from historical patterns and alerts sellers: "Your 200-unit stock will run out in 3 days. Trend is +40% this week. Disburse 15M now to capture the surge."
Credit Gamification (Level-Up Map) — Transparent progression system. Sellers see exactly what to do to unlock higher limits and lower rates: maintain refund rate <3%, keep API connected, grow revenue 15% month-over-month.
Admin Risk Dashboard — Portfolio-level view for Shinhan: real-time NPL tracking, credit score distribution, platform revenue analysis, and anomaly detection alerts.
How we built it
| Layer | Technology |
|---|---|
| AI Engine | Qwen Plus via DashScope API — prompt-engineered cash flow analysis and credit scoring with structured JSON output |
| Backend | FastAPI + SQLAlchemy + SQLite — 3 routers (sellers, loans, admin), comprehensive schema with idempotency keys, cap enforcement fields |
| Credit Engine | Dual-mode scoring: Qwen AI first, rule-based fallback with 6 weighted factors (revenue consistency 25%, volume 20%, return rate 15%, platform diversity 15%, growth 15%, activity 10%) |
| Frontend | React 19 + Vite + Tailwind CSS + Recharts — 4 pages (Landing, Seller Dashboard, AI Scoring Demo, Admin Dashboard) with animated analysis visualization |
| Data | Mock data generator (50 sellers, 8 months, 500+ cashflow records) with realistic e-commerce patterns |
Key architectural decisions:
- Rule-based fallback ensures the demo works even without API key — critical for hackathon reliability
- Animated scoring visualization (6-step sequential analysis with progress bars) makes the AI decision process transparent and impressive
- Revenue-based repayment simulator visually compares fixed vs dynamic payment plans, showing the core value proposition
Challenges we ran into
Structured JSON from LLM — Qwen's cash flow analysis sometimes returned markdown instead of clean JSON. We solved it with explicit output format requirements in the prompt and a robust rule-based fallback.
Scoring factor weighting — Balancing 6 factors to produce realistic scores (300-850 range) required iterative calibration. We landed on a weighted formula that correlates well with our mock data's ground-truth risk labels.
Revenue-based repayment math — Calculating months-to-repay with a variable revenue share percentage requires iterative simulation. We built a month-by-month projection that shows the compounding effect of dynamic deductions.
Demo data realism — Generating 50 sellers with believable cash flow patterns (seasonality, growth trends, platform diversity) required a multi-stage data generator with configurable seeds for reproducibility.
Accomplishments that we're proud of
- End-to-end credit pipeline in a hackathon: from seller onboarding data → AI scoring → loan approval → repayment simulation → admin monitoring
- Explainable AI — Every credit decision comes with reason codes (
REVENUE_VOLATILITY_HIGH,REFUND_RATE_ELEVATED, etc.) and weighted factor breakdowns, not a black-box score - Revenue-Based Repayment that actually works mathematically — the simulator proves that dynamic deductions reduce both borrower stress and lender NPL risk
- NPL target <5% achieved through conservative scoring, dynamic deduction caps, and real-time monitoring
- Vietnamese-localized UI — All labels, risk categories, and platform names in Vietnamese for the target market
What we learned
AI for credit scoring is viable but needs guardrails — LLMs can analyze cash flow patterns effectively, but the rule-based fallback is essential for production reliability.
Revenue-based financing aligns incentives — When repayment scales with revenue, borrowers don't get crushed during dry spells, and lenders get paid faster during boom periods. It's mathematically win-win.
Explainability beats raw accuracy — A 720 score with reason codes is more actionable (and more trusted) than a 720 score with no explanation. XAI is not optional in financial services.
Data quality determines everything — Our mock data generator taught us that realistic cash flow patterns (seasonality, growth curves, platform quirks) are essential for meaningful scoring.
What's next for SF12
Phase 1: Production Pipeline (Post-Hackathon)
- Real API integrations — Shopee Open API, TikTok Shop API, MoMo Open Banking for live data ingestion
- eKYC + e-Contract — Digital identity verification and smart contract signing
- Virtual Account system — Auto-disbursement and auto-collection via bank API with idempotency enforcement
- Middle-office sub-ledger — Cloud-based micro-transaction ledger with EOD batch posting to Core Banking
Phase 2: Advanced AI Risk Management
- GNN Fraud Detection — Graph Neural Networks to detect brushing networks (fake orders, same IP/device clusters)
- Platform Evasion Detection — Anomaly detection comparing actual traffic vs reported revenue
- Loan Stacking Detection — NLP analysis of Open Banking statements to identify hidden debts
Phase 3: Smart Assistant (Mobile App)
- Cash Flow Thermometer — Real-time visualization of dynamic deduction rates adjusting to daily revenue
- Predictive Business Insights — Push notifications: "Trend alert — restock now, demand surging next week"
- Level-Up Map — Gamified credit building with missions and unlockable rewards
- Vietnamese Voicebot — AI advisory in natural language, collection calls within legal hours (07:00-21:00)
Phase 4: Compliance & Scale
- Interest Rate Cap Enforcement — Smart contract auto-stops collection when total cost hits 20%/year (Civil Code 2015)
- Decree 13/2023 Compliance — Explicit consent, data minimization, buyer PII filtering
- 30-Day Reconciliation Period — Safe NPL classification that doesn't auto-flag temporary cash flow gaps
- Pilot with 500 Shinhan sellers — Real-world validation before scale
Built With
- css
- fastapi
- json
- next.js
- postcss
- python
- qwen
- tailwind
- typescript
- vercel

Log in or sign up for Devpost to join the conversation.