Personal finance dashboards: bank aggregation and subscription detection
personal-financesimplefinplaidbankingsubscriptionscsvphpsqlite
A personal dashboard that shows every bank and card account in one place (net worth, spending this month, upcoming payments, subscriptions) needs two things: a way to read transactions from many institutions, and some analysis to turn raw transactions into answers. This covers the data sources available to an individual (not a business) in 2026 and the heuristics that work, from building Accounts (accounts.jhampton.io, plain PHP + SQLite, 2026-11).
Getting the data
| Source | Who can use it | Access | Notes |
|---|---|---|---|
| SimpleFIN Bridge | Individuals | Read-only balances + transactions | About $15/year. Built for personal apps: no developer approval. |
| Plaid | Companies | Read (Transactions), and money movement via Plaid Transfer | Production access needs a business application and review; Transfer needs extra approval. Overkill for one person. |
| CSV / OFX export | Anyone | Whatever the bank exports | Works for every bank; manual, but a good fallback and for history beyond the aggregator's window. |
| Bank APIs | Rare | Varies | Few US banks offer consumer APIs. |
How SimpleFIN works
- The user creates a Setup Token at the Bridge site and pastes it into the app. The token is base64 of a claim URL.
- The app POSTs to that URL once; the response is an Access URL of the form
https://user:pass@host/simplefin. A second claim gets a 403, which means the token was already used (if not by you, disable it: it may be compromised). - The app stores the Access URL (it is a bearer credential: encrypt it at rest with a key kept in server-only config) and calls
GET <access>/accounts?version=2&pending=1&start-date=&end-date=with HTTP basic auth from the URL's user and password. - Limits: about 24 requests a day, at most 90 days per request (45 recommended). Fetch history in 45-day windows, then sync recent days a few times a day (every 6 h covering the last 10 days works). - Errors: 403 = access revoked (reconnect with a new token), 402 = subscription payment due.
Read-only means link out
An aggregator like SimpleFIN cannot move money or cancel anything. So the honest design is: - Cancel a subscription: open the company's cancel page (keep a small merchant table of known cancel URLs), else a "how to cancel X" search. - Transfers and bill payments: record the plan in the app and open the bank's site to do it. Only manual accounts can have their balances changed by the app. - Native transfers would need Plaid Transfer (business approval) or a bank's own API.
Turning transactions into answers
- Merchant keys: normalize descriptions before grouping. Strip card-processor noise (
*2K4,#123, trailing state codes, card numbers, dates), keep a leading domain's name (AMAZON.COM*...→ AMAZON) and drop later help/billing URLs. - Categories: the merchant category code (MCC) when the source provides one, else keywords. A known biller wins over generic wording: "UTILITY ONLINE PAYMENT" is a bill, not a transfer.
- Transfers between your own accounts: pair a debit with a credit of the same amount in a different account within about 4 days, and exclude both from spending. Otherwise every card payment counts twice.
- Refunds (positive amounts that aren't income) reduce spending rather than counting as income.
Detecting recurring charges
Per merchant, over posted (not pending) debits: 1. Merge same-day charges (split charges count once). 2. Take the median gap between charge days and match it to an interval window: weekly 5 to 9 days, biweekly 12 to 17, monthly 26 to 35, quarterly 84 to 98, yearly 350 to 380. Require at least 60% of gaps to fit, and at least 4 charges for weekly. 3. Require steady amounts (60% of charges within 25% of the median, or within $1 for small amounts), except for known bills, whose amounts vary (utilities). 4. Reject habits: frequent charges at grocery, gas, dining or shopping merchants that aren't known services are not subscriptions. 5. A single charge from a known subscription service still counts (monthly if recent, else probably yearly), with low confidence. - Next date = last charge + interval. Roll forward only one missed cycle; if a charge is overdue by more than half its period (minimum a week), mark it possibly stopped instead of predicting forever. - Monthly cost for comparison = amount × 30.44 / period days. - Let the user override: mark canceled or ignored, rename, attach a cancel URL.
Gotchas
- Server-side outbound HTTPS from PHP under SELinux needs
httpd_can_network_connect(SELinux blocks Apache's outgoing connections by default; it may already be on if another site on the server needed it). See SELinux file contexts and booleans on web servers. - An aggregator only has as much history as its window; import older months from CSV.
- Treat the whole dashboard as sensitive: passcode-gated, never listed publicly.
See also
- Planning a card payment processing system
- A production vanilla-JS single-page app (no framework, no build)
- Apache vhost gotchas (icons alias, manifests, SPA fallback, redirects)