Inspiration

Payment fraud detection requires more than generating alerts. Financial analysts need transparent risk explanations, reliable transaction context, efficient investigation workflows, and auditable evidence.

FraudShield AI was developed to demonstrate how PayPal Sandbox integration, explainable artificial intelligence, and structured human review can work together in an accessible payment-risk investigation system.

What it does

FraudShield AI is an interactive payment-risk intelligence prototype that integrates PayPal Sandbox order data with explainable risk assessment and machine-learning anomaly detection.

The application provides:

  • PayPal Sandbox integration: Authenticates using OAuth 2.0, creates test orders, retrieves order details, and imports transaction amounts and currencies into the analysis workflow.
  • AI-powered anomaly detection: Uses an Isolation Forest model trained on synthetic transaction data to identify statistical deviations.
  • Explainable risk scoring: Calculates transparent rule-based scores and identifies the indicators contributing to each result.
  • Human-review recommendations: Helps analysts prioritize suspicious patterns without automatically blocking or rejecting transactions.
  • Analyst Workbench: Analyzes batches of up to 200 synthetic or manually entered USD transactions and ranks cases for review.
  • Investigator review workflow: Provides structured investigation queues and session-based review status tracking.
  • Audit reporting: Generates downloadable JSON reports with SHA-256 integrity checks, along with CSV analysis history.
  • Risk Intelligence Lab: Demonstrates risk scenarios and counterfactual sensitivity analysis.

The application distinguishes PayPal-provided order information from manually entered risk indicators.

How we built it

FraudShield AI was developed using Python, Streamlit, the PayPal REST Sandbox API, OAuth 2.0, scikit-learn, NumPy, and Pandas.

The application combines a deterministic rule-based scoring engine with an Isolation Forest model trained on reproducible synthetic data.

We implemented transaction validation, currency handling, order-source attribution, investigation workflows, JSON audit exports, and integrity verification.

Automated regression tests and Python compilation checks are integrated into GitHub Actions.

The working application is deployed through Streamlit Community Cloud.

Challenges we ran into

Key engineering challenges included:

  • Integrating authenticated PayPal Sandbox order information with the analysis workflow.
  • Preserving the distinction between retrieved transaction data and manually supplied indicators.
  • Preventing unsupported currency conversions and invalid transaction inputs.
  • Explaining statistical anomalies without presenting them as confirmed fraud.
  • Generating reproducible audit reports and implementing integrity verification.
  • Designing investigation workflows that support human judgment rather than automated payment decisions.

Accomplishments that we're proud of

We implemented and demonstrated a functional PayPal Sandbox order-retrieval workflow, explainable risk scoring, synthetic machine-learning analysis, investigation prioritization, and downloadable audit reports.

The system also includes an Analyst Workbench for batch transaction triage and integrity verification for exported reports.

The prototype provides a practical foundation for transparent payment-risk investigation and demonstrates how AI-assisted analysis can support accountable human decisions.

What we learned

Effective fraud-risk intelligence requires transparency, reliable data provenance, reproducibility, and human oversight.

Machine-learning anomaly detection is valuable as an investigative signal, but it should not be confused with verified fraud detection or a calibrated probability of fraud.

What's next

Future development will focus on:

  • Evaluating detection performance using lawfully obtained, labeled transaction datasets.
  • Measuring precision, recall, false-positive rates, and operational performance.
  • Improving model calibration and adaptive risk analysis.
  • Integrating additional authorized fraud intelligence signals.
  • Expanding secure case management and evidence provenance.
  • Strengthening authentication, access controls, and persistent audit logging.

Important limitations

FraudShield AI is a demonstration prototype, not a production payment-processing or fraud-enforcement system.

The machine-learning model uses synthetic training data. Risk indicators are supplied manually and are not verified fraud signals from PayPal. The application does not process real payments or automatically block transactions.

SHA-256 checksums help detect content changes but do not independently establish report authorship or authenticity.

No validated real-world fraud detection accuracy is claimed.

Built with

Python, Streamlit, PayPal REST Sandbox API, OAuth 2.0, scikit-learn, Isolation Forest, NumPy, Pandas, GitHub Actions.

Links

Live Application: https://paypal-ai-fraudshield.streamlit.app/

Source Code: https://github.com/taleem1120-glitch/paypal-ai-fraudshield

Final Demonstration Video: https://youtu.be/0_7MDIwduA4 Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for PayPal AI FraudShield

Built With

Share this project:

Updates

Submission history