ippo_loanpilot 0.3.0
ippo_loanpilot: ^0.3.0 copied to clipboard
Flutter/Dart SDK for IppoPay LoanPilot — analyse bank statements, pull credit reports, and manage borrowers and loans with an ippo API key.
ippo_loanpilot #
Flutter/Dart SDK for IppoPay LoanPilot (app.ippo.one) — analyse a bank
statement, pull a credit report, and manage borrowers and loans, all with an
ippo API key. The Dart sibling of the npm @ippopone/loanpilot.
Pairs with ippo_agents: use ippo_agents
for the voice/chat assistant and ippo_loanpilot for the actual loan work (the
check_pan / statement-analysis side of a lending app).
Install #
flutter pub add ippo_loanpilot
Quick start #
import 'package:ippo_loanpilot/ippo_loanpilot.dart';
final lp = LoanPilot(apiKey: 'sk_live_...');
// 1. PAN + credit check (billable; reused ~30 days)
final check = await lp.creditChecks.create(name: 'Meera', mobile: '9876543210', consent: true);
print('score: ${check.score}');
// 2. Analyse a statement PDF and wait for the offer
final started = await lp.analyses.create(
CreateAnalysis(fileBytes: pdfBytes, fileName: 'statement.pdf'),
);
final done = await lp.analyses.waitFor(started.id); // polls to completion
print('${done.decision} · score ${done.finalScore}');
final offer = done.result?['offer']; // full result payload
// 3. Borrowers & loans
final cust = await lp.customers.create(pan: 'ABCDE1234F', name: 'Meera', mobile: '9876543210');
final loan = await lp.loans.create(customer: cust.ref!, principal: 120000, rate: 0.18, tenureMonths: 12);
await lp.loans.addRepayment(loan.id, amount: loan.emi ?? 0);
Auth #
- API key (server-side / trusted):
LoanPilot(apiKey: '…'). - Native app: don't embed a long-lived key. Call
login(email, password)to get a short-lived bearer token, store it in the device keystore, and construct with that token.logout()revokes it.
Resources #
| Resource | Methods |
|---|---|
analyses |
create (PDF upload), combine (2–6 statements), original (download PDF), list, get, waitFor |
creditChecks |
create, upload, list, get |
customers |
create, list, get, update, attach, catalog, getProfile/putProfile, businesses/addBusiness/updateBusiness/removeBusiness |
loans |
create, list, get, addRepayment, forCustomer |
aa |
start (consent), get, list, refresh, analyse, cancel — Account Aggregator statement pull |
products |
list |
| client | me(), login(), logout() |
Typed records (Analysis, CreditCheck, Customer, Loan, Product) expose
the common fields; the full server JSON is always on .raw (and the analysis
result on Analysis.result).
Customization #
final lp = LoanPilot(
apiKey: 'lp_live_...',
timeout: const Duration(seconds: 45), // statement analysis can be slow
maxRetries: 3, // idempotent GETs retry on 429/5xx
defaultHeaders: {'x-trace-id': '...'},
);
License #
MIT © IppoPay