Inspiration
Managing personal finances is not just about knowing how much money is spent, but understanding where it goes, why spending patterns change, and what actions can be taken to manage it better. Traditional transaction histories often display merchant names, dates and amounts without providing meaningful explanations or useful financial insights.
We wanted to bridge this gap by combining Artificial Intelligence with payment technology. Originally developed as an automated financial transaction categorisation project for the GHCI 2025 Hackathon by Team Tech4Good, InHouseTX has evolved into PayPal AI Spending Intelligence for the 2026 hackathon. Our vision is to transform ordinary payment activity into understandable, explainable and actionable financial intelligence.
What it does
InHouseTX is an AI-powered financial intelligence platform that helps users understand and analyse their spending activity.
Its key capabilities include:
- PayPal Integration: Connects PayPal Sandbox checkout with server-side order creation and payment capture workflows.
- Intelligent Transaction Categorisation: Automatically classifies transaction descriptions into categories using Machine Learning.
- Explainable AI: Provides prediction confidence and identifies the text features that influenced each categorisation.
- Spending Analytics: Analyses spending patterns across categories, merchants and time periods while keeping different currencies separate.
- Anomaly Detection: Identifies unusual transaction amounts and spending frequencies using historical patterns.
- Human-in-the-Loop Feedback: Allows users to correct categorisation results and submit feedback for review.
- AI-Powered Insights: Generates understandable financial summaries and answers spending-related questions using persisted transaction data.
The platform also distinguishes PayPal-sourced transactions from synthetic demonstration data and CSV imports to maintain transparency about transaction origins.
How we built it
We built InHouseTX using a modular architecture with a Python Flask backend and a responsive web-based frontend.
The backend uses Flask and SQLAlchemy for application logic, authentication and transaction persistence. SQLite supports local development, with PostgreSQL database URL support for deployment.
For payment integration, we implemented PayPal OAuth 2.0 authentication, the PayPal REST API Orders v2 for order creation and capture, and the PayPal JavaScript SDK for the buyer approval experience. Payment details are verified through server-side PayPal responses before being recorded as PayPal transactions.
For the Machine Learning pipeline, we used scikit-learn with TF-IDF vectorisation and Logistic Regression to categorise transaction descriptions. The model provides confidence probabilities and feature-based explanations. A feedback workflow supports human review of uncertain predictions.
We also implemented analytics, budget tracking, unusual-spending detection and a deterministic financial insights service that grounds its responses in persisted transaction records. The frontend uses HTML, CSS and JavaScript to provide an interactive dashboard and transaction-management experience.
Challenges we ran into
One major challenge was integrating payment processing with reliable transaction verification. A successful buyer approval or browser redirect does not necessarily mean that a payment has been captured. We designed the workflow so that the backend communicates with PayPal and verifies the payment state before recording a completed transaction.
Another challenge was making Machine Learning predictions understandable rather than treating them as black-box decisions. We addressed this by exposing prediction confidence and contributing text features.
We also encountered challenges in maintaining accurate calculations across multiple currencies, identifying unusual spending patterns without incorrectly labelling them as fraud, ensuring account-level data isolation, and separating synthetic demonstration records from actual PayPal transactions.
Balancing a polished user experience with reliable backend functionality, security and transparent AI explanations was another important part of the development process.
Accomplishments that we're proud of
We are proud of evolving the original InHouseTX project into a comprehensive financial intelligence prototype with payment integration, explainable Machine Learning and interactive spending analytics.
Some of our key accomplishments include:
- Implementing PayPal Sandbox integration paths using Orders v2 and OAuth 2.0.
- Building an automated transaction categorisation pipeline using TF-IDF and Logistic Regression.
- Providing transparent, feature-based explanations for Machine Learning predictions.
- Developing an interactive dashboard with category-wise and currency-aware analytics.
- Implementing unusual-spending detection and human-in-the-loop feedback.
- Building a grounded financial insights service.
- Creating a redesigned responsive interface and an organised, documented public GitHub repository.
- Establishing automated backend and frontend checks, with 26 tests passing in the latest recorded test run.
Most importantly, we built the platform around the idea that financial AI should not only provide predictions but also help users understand the reasoning behind them.
What we learned
Through this project, we learned that building useful financial AI requires more than training a Machine Learning model. Reliable payment verification, responsible data handling, explainability and accurate financial calculations are equally important.
We strengthened our understanding of PayPal's payment workflow, REST API integration, OAuth authentication, Flask application development, database persistence and explainable Machine Learning.
We also learned to distinguish unusual activity from confirmed fraud, synthetic evaluation results from real-world performance, and payment approval from successful server-side capture.
This experience reinforced our belief that transparency, reliability and human oversight should remain central to financial AI systems.
What's next for InHouseTX — PayPal AI Spending Intelligence
We plan to expand InHouseTX into a more comprehensive and personalised financial intelligence platform.
Our future roadmap includes completing and documenting end-to-end PayPal Sandbox payment and webhook verification, improving the classifier with larger and more representative transaction datasets, expanding anomaly detection, and developing more personalised spending recommendations.
We also aim to deploy the platform with managed secrets and persistent cloud storage, strengthen responsive testing, and explore additional financial data integrations.
Our long-term vision is to make financial management more accessible by turning complex transaction histories into clear explanations and informed decisions.
InHouseTX — Understand Every Transaction. Make Every Payment Count.
Project status: Hackathon prototype using PayPal Sandbox. It does not process live payments or provide unrestricted access to personal PayPal account history.
Built With
- 2.0
- ai
- api
- artificial
- css
- explainable
- fintech
- flask
- html
- intelligence
- javascript
- learning
- logistic
- machine
- oauth
- paypal
- postgresql
- python
- regression
- rest
- sandbox
- scikit-learn
- sqlalchemy
- sqlite
- tf-idf