Inspiration
For freelancers and small service teams, billing is not always as simple as sending an invoice after finishing a project.
Agreements, project milestones, client approvals, deposits, and invoices are often managed across different documents and tools. Even when the contract clearly states a fee, that may not be the amount the client should be invoiced today.
For example, a $500 contract might have a $100 credit, an unsigned price change, or work that has not yet been accepted. Missing any of these details can lead to an incorrect invoice or a billing decision made too early.
I wanted to build a workspace that reduces manual work while keeping people in control. AI can help users understand agreements faster, but financial decisions should be based on evidence, clear rules, and human approval.
What it does
FairPay AI is an evidence-led billing workspace that helps users move from agreement terms to safer, reviewable PayPal invoice drafts.
Unlike a basic AI invoice generator, FairPay does not turn an extracted amount directly into an invoice. It helps users understand whether that amount is actually ready to be billed.
The workflow connects five steps:
- AI-assisted agreement analysis. A local AI model suggests milestones, fees, deliverables, and supporting excerpts from the original agreement.
- Source verification. AI suggestions are checked against the agreement. Incorrect amounts can be identified and corrected before the user proceeds.
- Financial reconciliation. Contract fees, manually recorded credits, and calculated outstanding balances are kept separate.
- Human review and authorization. Missing evidence, incomplete financial review, or unconfirmed client acceptance can block invoice drafting.
- PayPal Sandbox integration. Users can create authorized invoice drafts and review their status through PayPal's API. Drafts are not automatically sent, and payments are not automatically collected.
The goal is not to automate every financial decision. It is to make each decision easier to understand, review, and trust.
How we built it
FairPay AI uses a browser-based interface with a Node.js backend. Project records, agreement versions, and review history are stored locally.
For agreement analysis, the application uses Qwen3 4B Instruct through Ollama. The model proposes information from the agreement, while source checks, deterministic financial rules, and human review determine what can happen next.
I integrated the PayPal Invoicing REST API v2 in Sandbox mode to support explicitly authorized invoice drafts and status read-backs. The application also includes safeguards for amount mismatches, incomplete reviews, uncertain API responses, and duplicate invoice creation.
The prototype is open source and runs locally. It uses synthetic examples and is not intended for production payments.
Challenges we ran into
The biggest challenge was making AI useful without giving it authority over financial decisions.
AI can extract the wrong number, misunderstand a condition, or produce a convincing answer that does not match the original agreement. Rather than assuming the output is correct, FairPay keeps AI suggestions separate from source evidence and requires review before moving forward.
Another challenge was handling financial details that a contract alone cannot verify. A recorded credit does not prove that money was received, and a completed milestone does not automatically prove client acceptance. These checks need to remain separate.
PayPal integration also required careful handling of uncertain responses. An incomplete API response should not be interpreted as a successful payment. I added conservative status handling and tested important failure cases using synthetic data.
Accomplishments that we're proud of
The completed prototype connects agreement analysis, evidence review, financial reconciliation, human approval, and PayPal Sandbox invoice handling in one workflow.
Three separate demonstrations highlight its capabilities:
AI amount correction. In one example, the AI initially suggests $50, while the agreement states $500. Source verification identifies the mismatch and displays the corrected amount for review.
Billing safety controls. Another example shows a milestone that cannot proceed to invoice drafting because the required financial review has not been completed. The interface explains what needs attention next.
PayPal Sandbox draft. A separate sample project demonstrates an existing $400 PayPal Sandbox invoice DRAFT, based on a $500 agreement less a $100 manually recorded credit. The draft's status is read back through PayPal. The credit is not bank-verified, and the invoice has not been sent or paid.
These are separate demonstration scenarios, not one completed payment transaction.
I am especially proud that FairPay brings these checks together without treating AI predictions or incomplete financial information as authorization to bill.
What we learned
One of the most important lessons was that finding the correct contract amount is different from deciding whether it is ready to be invoiced.
AI suggestions, source evidence, recorded credits, client acceptance, billing authorization, and PayPal status all represent different information. Keeping them separate makes the workflow more transparent and helps prevent unsupported billing decisions.
I also conducted a small usability test with three first-time, non-expert users. Ease of use averaged 4.0/5, while clarity of the next step averaged 3.0/5.
Their responses highlighted confusion around the sample outstanding balance and the order of billing reviews. This helped identify two priorities for future improvement: clearer financial status information and more intuitive guidance for the next action.
The test was exploratory and too small to establish broader usability or business impact, but it provided useful early feedback.
What's next
The next step is to test FairPay AI with freelancers and small service teams to better understand their actual billing workflows.
Future improvements will focus on clearer onboarding, stronger identity and payment verification, more comprehensive testing, secure data handling, and production-ready deployment.
The long-term goal is to make billing easier and more reliable without removing human control from important financial decisions.
Built With
- css3
- html5
- javascript
- json
- node.js
- ollama
- paypal-invoicing-api
- paypal-sandbox
- qwen3
- rest-api
Log in or sign up for Devpost to join the conversation.