TrustPay AI – Review Before You Pay
Understand the risk. Compare the options. Stay in control of your payment.
TrustPay AI is an AI-assisted shopping intelligence platform that helps people make more informed purchasing decisions before sending money. It combines a multi-agent risk assessment system, explainable recommendations, product comparisons, human approval, and PayPal sandbox checkout in one connected experience.
Inspiration
Online shopping should be convenient, but making a safe purchasing decision is not always straightforward.
A product might appear to be a great deal while hiding important warning signs: an unusually low price, an unfamiliar seller, incomplete product information, unclear refund policies, or pressure to pay outside a trusted platform.
Buyers often have to investigate all of these signals themselves, switching between product listings, search engines, retailer websites, and payment platforms. Even then, they may not have enough information to make a confident decision.
We wanted to rethink this experience.
What if AI could help buyers understand the risks of a purchase before they commit to paying?
That question inspired TrustPay AI.
Our goal was not to replace human judgment with an automated fraud verdict. Instead, we wanted to build an intelligent assistant that investigates a purchase from multiple perspectives, explains its findings in understandable language, and gives the buyer the final decision.
By combining specialized AI agents with PayPal checkout and a human-in-the-loop approval process, we created a prototype where intelligent analysis happens before payment—not after something goes wrong.
What it does
TrustPay AI transforms a product listing into an explainable purchase-risk review and a human-controlled checkout experience.
1. AI-powered purchase analysis
Users can submit a product listing URL or manually enter product information, including the price, seller details, description, and return policy.
TrustPay AI processes this information using four specialist agents:
- Product Agent: Examines product descriptions for counterfeit indicators, suspicious wording, urgency tactics, and missing information.
- Seller Agent: Evaluates available seller reputation signals, account history, off-platform communication requests, and potentially unsafe payment methods.
- Price Agent: Identifies unusual discounts and price inconsistencies using a supplied reference price or a clearly labeled AI estimate.
- Policy Agent: Reviews refund policies, return windows, restocking fees, and delivery conditions.
Each agent combines transparent, rule-based checks with AI-assisted reasoning.
2. Multi-agent risk orchestration
An orchestration layer combines the specialists' findings into an overall risk assessment.
TrustPay AI generates:
- A risk indicator from 0 to 100.
- A classification of Low, Medium, High, or Critical.
- Individual agent findings and explanations.
- A summary of important warning signs.
- Recommendations for the buyer.
- Questions buyers can ask sellers before making a decision.
The system also identifies suspicious combinations of signals, such as an extremely low price paired with a newly created seller account.
The result is an explainable risk indicator, not an unsupported guarantee that a seller or transaction is safe.
3. Human-in-the-loop purchase approval
One of TrustPay AI's most important features is its approval gate.
AI provides analysis, but the buyer remains responsible for the final decision.
Users can review the findings and either approve or reject the purchase. Higher-risk assessments require explicit risk acknowledgment, while critical-risk approvals also require a written explanation.
The backend enforces this decision before creating a PayPal order.
This approach helps ensure that AI remains a decision-support tool rather than an autonomous system that can initiate payments without human authorization.
4. PayPal-powered checkout
After the buyer approves a purchase, TrustPay AI can initiate a PayPal sandbox checkout.
The payment integration includes:
- PayPal Orders API integration.
- Buyer approval through PayPal-hosted checkout.
- Payment capture and verification.
- Order status tracking.
- Signature-verified webhook processing.
- Retry-safe order and capture operations.
- Refund handling.
- Transaction-related audit records.
The checkout flow also supports requesting English, Arabic, or French on PayPal-hosted pages, subject to PayPal's localization behavior.
For the hackathon, payments use PayPal's sandbox environment and test funds.
5. Channel3 product comparisons
TrustPay AI integrates Channel3 product search to help users investigate alternative offers before making a purchase.
Users can search for a product and explore available retailer offers, prices, currencies, and external shopping links.
These comparisons provide additional shopping context and help buyers assess whether an advertised deal deserves further investigation.
Comparison results are treated as information, not automatic proof that a retailer is trustworthy.
6. Analytics and purchase intelligence
TrustPay AI includes an analytics workspace for reviewing purchase assessments and payment activity.
The dashboard provides risk distributions, assessment history, payment statuses, searchable records, and visual reporting.
Using AG Studio by AG Grid, users can explore structured assessment data through interactive tables, charts, and editable reports.
This extends the project beyond an individual checkout flow into a foundation for monitoring and understanding purchase-related decisions.
7. Responsive, modern interface
We built a React-based application with a professional dashboard, dedicated purchase review and comparison experiences, payment history, developer diagnostics, and light/dark appearance options.
The interface is designed to make technical risk findings easier to understand and to keep the user informed throughout the review and payment process.
How we built it
TrustPay AI was developed as a full-stack application combining AI orchestration, backend payment services, external product search, and an interactive frontend.
TRUSTPAY AI
Review Before You Pay
|
v
[ React + Vite ]
User Dashboard
|
v
[ FastAPI API ]
Product Data Extraction
|
v
[ MULTI-AGENT SYSTEM ]
|
+---------+---------+
| |
v v
[ Product AI ] [ Seller AI ]
| |
+---------+---------+
|
+---------+---------+
| |
v v
[ Price AI ] [ Policy AI ]
| |
+---------+---------+
|
v
[ RISK ORCHESTRATOR ]
Risk Score: 0-100
|
v
[ EXPLAINABLE REPORT ]
Findings and Warnings
|
v
[ HUMAN APPROVAL ]
|
+------+------+
| |
v v
[Reject] [Approve]
| |
No Payment v
[ PayPal Sandbox ]
|
v
[ Payment Capture ]
|
v
[ SQLite Database ]
|
v
[ AG Studio Analytics ]
EXTERNAL INTEGRATIONS
---------------------
Channel3 : Product Comparisons
LLM APIs : AI Risk Reasoning
PayPal : Secure Sandbox Check
Frontend — React, Vite, and JavaScript
We used React to build the shopping review interface, dashboard, comparison tools, and payment workflow. Vite provided a lightweight development and production build environment.
Backend — Python, FastAPI, and Pydantic
FastAPI powers the application's REST endpoints, input validation, asynchronous agent execution, purchase assessments, user decisions, and PayPal operations.
Pydantic provides structured models for listing information, assessment reports, and API requests.
AI reasoning — Multi-agent architecture and LLM APIs
We implemented four specialized analysis agents and a risk orchestrator.
The agents execute concurrently and combine deterministic safety rules with large language model analysis. The backend supports OpenAI-compatible LLM APIs and Anthropic's Messages API.
Rather than trusting AI output unconditionally, the system applies scoring constraints, preserves rule-based findings, and explicitly reports when AI analysis is unavailable.
Listing extraction — Beautiful Soup and structured data
For URL-based reviews, the backend retrieves publicly accessible listing content and extracts product information using structured metadata and text analysis.
We also included URL and network restrictions to reduce the risk of unsafe server-side requests.
Payments — PayPal REST APIs
We connected the risk-assessment workflow to PayPal's Orders and Payments APIs.
A backend-enforced approval gate separates AI analysis from payment initiation. Payment capture responses are checked against the original assessment, while PayPal webhooks help maintain accurate payment status.
Product discovery — Channel3 API
We integrated Channel3 through a server-side API endpoint, keeping its credentials away from the browser.
Search results are normalized into product and retailer offers that users can inspect within the application.
Analytics — AG Studio by AG Grid
We connected AG Studio to application assessment records, enabling interactive analysis of purchases, risk indicators, and payment statuses.
Data persistence — SQLite
SQLite stores assessments, payment information, audit events, and processed webhook identifiers.
Testing and deployment preparation
We created automated backend tests for risk scoring, agent behavior, payment workflows, webhook handling, product search, and other critical application functionality.
The repository also includes frontend aggregation tests, production build configuration, and deployment configuration for Render and Vercel.
System workflow
Product listing → Four AI agents → Risk orchestrator → Explainable assessment → Human approval → PayPal checkout → Payment verification → Analytics and audit history
This architecture keeps AI recommendations, human decisions, and payment execution as separate but connected responsibilities.
Challenges we ran into
Building AI that is explainable instead of blindly trusted
One of our biggest challenges was translating different types of shopping risk into a consistent assessment.
Product authenticity signals, seller reputation, price anomalies, and return policies are not directly comparable.
We addressed this by combining specialist agent scores with a weighted orchestration system, severity thresholds, and cross-agent risk detection.
We also designed guardrails so AI-generated conclusions cannot simply erase important rule-based warning signs.
Connecting AI analysis with real payment infrastructure
Integrating an AI assessment workflow with PayPal required more than generating a checkout link.
We had to account for approval enforcement, order creation, payment capture, callback handling, duplicate requests, and delayed or repeated webhook events.
We structured the payment workflow around persistent assessment records, idempotency identifiers, and verification of captured payment details.
Working with incomplete product information
Not every website provides structured product data, and some pages depend heavily on JavaScript or require authentication.
We implemented structured-data extraction, text-based analysis, missing-field reporting, and a manual listing entry option.
This allows users to continue their review when automatic extraction is unavailable.
Managing LLM reliability
External AI services can fail, return malformed responses, or produce uncertain conclusions.
We implemented a deterministic analysis fallback, explicit AI availability status, and bounded score adjustments.
This makes it clearer when the assessment includes AI reasoning and when it relies only on rule-based signals.
Integrating external services
Combining PayPal, Channel3, AI providers, and AG Studio introduced challenges involving API response formats, authentication, configuration, and frontend-backend communication.
We separated these integrations into dedicated backend components and added automated tests with mocked external services.
Making technical risk assessments understandable
An effective purchase assistant should not force users to interpret complex AI output.
We focused on presenting risk levels, findings, seller questions, and recommendations through a structured, user-friendly dashboard.
Accomplishments that we're proud of
Our biggest accomplishment is turning a simple idea—review before you pay—into a connected full-stack prototype.
We are particularly proud of:
- Building a four-agent AI review system that examines different aspects of purchase risk and combines the findings into an explainable report.
- Implementing a backend-enforced human approval gate that prevents PayPal order creation before the buyer approves the assessment.
- Integrating PayPal sandbox checkout with payment verification, webhook handling, and audit records.
- Adding Channel3 product comparisons so buyers can investigate alternative offers alongside AI-generated findings.
- Creating an interactive analytics workspace using AG Studio and actual stored application records.
- Designing AI reliability safeguards, including rule-based fallback behavior and protections against attempts to manipulate the assessment.
- Building an automated regression test suite covering important risk assessment, payment, and integration scenarios.
Most importantly, we demonstrated an architecture in which AI can provide valuable financial decision support while preserving human control over payment actions.
What we learned
Building TrustPay AI strengthened our understanding of how AI systems can interact responsibly with financial workflows.
AI should support decisions, not silently make them.
A risk assessment is most valuable when the user understands the reasoning and retains control over the final action.
Multi-agent systems can make complex evaluations more structured.
Separating product, seller, pricing, and policy analysis allowed us to create focused evaluation logic and combine different perspectives.
Explainability is essential for trust.
A numerical score alone is insufficient. Buyers need to understand which signals were detected, what information is missing, and what steps they can take next.
Payment infrastructure requires careful state management.
We learned the importance of validating captured amounts, handling duplicate operations, verifying webhook signatures, and maintaining clear transaction histories.
Reliability matters as much as AI capability.
Combining deterministic checks with model-based reasoning gave us a more transparent design than relying entirely on an LLM.
Real-world integration requires honest boundaries.
Product comparisons do not guarantee retailer legitimacy, and risk indicators cannot guarantee that a transaction will be safe. Clear communication of these limitations is part of building trustworthy software.
What's next for TrustPay AI – Review Before You Pay
TrustPay AI is a hackathon prototype, but we see several opportunities to expand its capabilities.
1. More advanced fraud intelligence
Introduce stronger seller reputation signals, suspicious listing detection, historical pricing analysis, and additional fraud-pattern checks.
2. Better product verification
Explore integrations with trusted product catalogs and retailer data to improve model matching, price comparisons, and authenticity-related evidence.
3. Personalized shopping intelligence
Allow users to define preferences such as budgets, shopping categories, risk tolerance, and preferred retailers.
4. Continuous price and risk monitoring
Enable users to save potential purchases and receive updates when prices change or new risk information becomes available.
5. Stronger identity and account security
Introduce individual accounts, role-based access controls, secure multi-user data isolation, and more robust production authentication.
6. Expanded multilingual accessibility
Extend language support beyond PayPal-hosted checkout to the TrustPay interface, explanations, and AI-generated recommendations.
7. Production-grade infrastructure
Move toward scalable database storage, improved monitoring, stronger operational safeguards, and comprehensive end-to-end integration testing.
8. Broader commerce integration
Explore merchant integrations that could bring AI-assisted purchase reviews directly into online shopping experiences, while preserving user approval before payment.
Our vision
TrustPay AI is built around a simple principle: an informed decision should come before a financial commitment.
We believe the next generation of digital commerce should combine intelligent assistance, transparent explanations, secure payment infrastructure, and meaningful human control.
Our long-term vision is to make purchase-risk intelligence an accessible part of everyday online shopping.
TrustPay AI — Understand before you pay.
GitHub: https://github.com/yasmeenmh90-beep/trustpay-ai
Built for the PayPal AI Hackathon 2026.