Inspiration
Businesses often pay suppliers based on invoices and delivery documents, but manually checking these documents against purchase orders is time-consuming and error-prone.
A mismatched supplier, incorrect invoice amount, missing product, or suspicious document can result in financial losses.
We wanted to build a solution that verifies evidence before money moves.
That idea inspired ProofPay Nexus – Every Payment Should Have Proof.
What It Does
ProofPay Nexus is an AI-powered evidence-to-payment intelligence platform that connects document verification, discrepancy detection, payment risk assessment, and PayPal payments into one workflow.
Users can upload supplier invoices and supporting evidence. Google Gemini extracts structured information from documents, and the system compares the extracted invoice details against the corresponding purchase order.
The platform identifies:
- Supplier mismatches.
- Invoice total mismatches.
- Missing purchase order items.
- Unexpected invoice items.
- Other evidence inconsistencies.
A deterministic risk engine evaluates detected discrepancies and generates an explainable payment risk score with an Approve, Review, or Dispute recommendation.
For eligible transactions, users can proceed through PayPal Sandbox authorization and capture, with human approval required before payment capture.
How We Built It
We developed ProofPay Nexus using:
- Frontend: React, TypeScript, and CSS.
- Backend: ASP.NET Core 8 Web API and C#.
- Database: Microsoft SQL Server with Entity Framework Core.
- AI: Google Gemini API using the Google GenAI SDK.
- Payments: PayPal REST API and PayPal Sandbox.
- Webhook integration: Verified PayPal webhook events.
- Architecture: Lightweight Clean Architecture.
The workflow consists of:
- Create and manage purchase orders.
- Upload invoice or supporting evidence.
- Extract invoice information using Google Gemini.
- Compare extracted invoice data with purchase order details.
- Persist detected discrepancies.
- Generate an explainable payment risk assessment.
- Require human approval before payment capture.
- Process PayPal payment events and maintain audit records.
We also implemented document validation, file storage, database persistence, payment transaction tracking, and webhook signature verification.
Challenges We Faced
One of our biggest challenges was extracting meaningful information from real-world invoice documents. Invoices contain different layouts, promotional discounts, tax information, and billing-period descriptions. We improved our Gemini prompt to distinguish genuine purchased items from discounts and informational rows.
Another challenge was integrating the PayPal authorization and capture workflow. We implemented the required API calls and tested the payment lifecycle using PayPal Sandbox.
We also worked on making payment decisions explainable rather than allowing AI to make an uncontrolled payment decision.
What We Learned
Through this project, we learned how to integrate generative AI into a practical financial workflow, combine AI extraction with deterministic business rules, implement PayPal payment authorization and capture, and process verified webhook events.
Most importantly, we learned that AI should assist financial decisions while business rules and human approval maintain control.
What's Next
Future improvements include multi-user authentication, duplicate invoice detection, advanced fraud detection, additional document formats, cloud-based evidence storage, production payment provider integration, and advanced supplier risk intelligence.
Important Disclaimer
ProofPay Nexus is a hackathon MVP using PayPal Sandbox. It is not a production escrow service and does not independently guarantee physical delivery or product authenticity.
Built With
- asp.net-core-8
- c#
- entity-framework-core
- google-gemini
- google-genai-sdk
- microsoft-sql-server
- paypal-rest-api
- paypal-sandbox
- react
- rest-api
- typescript
- vite
- webhooks