Inspiration
Anyone who has run a small business or freelanced knows the awkward part of invoicing: the invoice goes out, the due date passes, and then you wonder when to follow up and what to say without hurting the relationship. It eats time, and much of it is guesswork. We wanted to take some of that pressure off while keeping the business owner in charge.
What it does
PaidPilot helps freelancers and small businesses that use PayPal invoices decide how to chase late payments. It looks at invoice details and the customer’s payment history to estimate how likely a payment is to be late. A fixed set of rules then turns that estimate into a recommended action, anywhere from doing nothing to suggesting a payment plan.
PaidPilot then drafts a follow-up email, either with Gemini or from a simple rule-based template. The owner sees the recommendation and the draft in a Streamlit dashboard, approves or rejects it, and can choose to send the email through Gmail. Nothing goes out unless the owner decides it should.
How we built it
PayPal Sandbox supplies the invoices, payment history, and payment events. The backend is FastAPI with SQLite for storing records. A machine-learning model scores late-payment risk, a deterministic policy layer picks the action, and Gemini writes the draft. The dashboard is built with Streamlit, and the app is deployed on Render.
Challenges we ran into
The hardest part was the handoff between the risk score and the message. A number like “78% likely to be late” is not much use on its own, and the email still has to sound polite and professional. The second challenge was getting the integrations (payment APIs, webhooks, email, and local data) to work together with a review step, without losing the owner’s control.
Accomplishments that we’re proud of
A complete workflow that runs from PayPal invoice data to risk prediction, policy, AI draft, human approval, email, and payment update. A design where the machine-learning model never makes customer-facing decisions on its own: the policy is deterministic and a human reviews every message. A working integration of PayPal Sandbox, webhooks, Gemini, and Gmail in one app, deployed publicly on Render.
What we learned
We learned how to connect a machine-learning prediction to a real workflow, and why a prediction shouldn’t make customer-facing decisions by itself. We also learned how many moving parts an integration-heavy app has, and how easy it is to break one piece when you change another.
What’s next for PaidPilot
PaidPilot is a hackathon prototype, and there is still work to do. The most important gap is that the email-send API doesn’t yet enforce a saved approval, so that check needs to move from the dashboard into the backend. We also want to test with more realistic payment data, add more follow-up options, and support more email providers.
Built With
- fastapi
- gmail-api
- google-gemini-api
- google-oauth-2.0
- joblib
- pandas
- paypal-rest-api
- paypal-webhooks
- pytest
- python
- scikit-learn
- sqlalchemy
- sqlite
- streamlit
- uvicorn
Log in or sign up for Devpost to join the conversation.