🛡️ PayShield AI Protect Every Payment. Investigate Every Threat. Empower Every Recovery.

  1. Inspiration

With the rapid growth of AI agents and autonomous payment systems, financial transactions are becoming increasingly automated. However, this convenience introduces new security risks, including unauthorized payments, suspicious recipients, excessive transactions, and difficulties recovering money after fraudulent activities.

We realized that most solutions focus on identifying fraud after a transaction has occurred. But what if we could prevent suspicious payments before execution, investigate unusual transaction patterns, and help users prepare recovery documentation — all within one platform?

This idea inspired us to build PayShield AI, an intelligent payment security and investigation platform designed to make autonomous payments safer and financial recovery more accessible.

  1. What it does

PayShield AI provides an integrated three-stage security ecosystem:

  1. AgentPay Firewall – PREVENT
  2. Evaluates payment requests using deterministic security policies.
  3. Checks agent identity, recipient authorization, transaction amounts, and frequency.
  4. Categorizes transactions into ALLOW, REVIEW, or BLOCK.
  5. Supports human approval for suspicious or high-risk transactions.
  6. Integrates PayPal Sandbox for secure payment workflow demonstrations.

  7. Fraud Intelligence – INVESTIGATE

  8. Visualizes transaction relationships through interactive network graphs.

  9. Helps identify suspicious connections between agents and recipients.

  10. Provides transaction insights and risk-oriented indicators.

  11. Enables investigators to create cases, manage investigation statuses, and maintain analyst notes.

  12. Uses PostgreSQL for persistent investigation records.

  13. Payback AI – RECOVER

  14. Allows users to upload transaction evidence in supported formats.

  15. Extracts relevant information such as transaction IDs, amounts, dates, and recipients using OCR and text extraction.

  16. Allows users to review, edit, and manually verify extracted information.

  17. Generates structured complaint drafts and provides reporting guidance.

  18. Helps users organize evidence for potential financial disputes.

Together, these modules create a unified workflow:

PREVENT → INVESTIGATE → RECOVER

  1. How we built it

We developed PayShield AI using a modular architecture combining modern web technologies, payment APIs, data visualization, database persistence, and OCR.

Technology stack:

  • Frontend:Next.js 15, React 19, TypeScript.
  • Backend: Next.js server-side API routes.
  • Database: PostgreSQL for investigation cases and evidence persistence.
  • Authentication:Auth.js with Google, GitHub, and demo login providers.
  • Payment Integration: PayPal REST Orders v2 Sandbox.
  • Data Visualization:React Flow, AG Grid, and AG Studio.
  • OCR & Document Processing:Python, FastAPI, and PaddleOCR.
  • Deployment: Render.

We implemented server-side payment policy evaluation to ensure that authorization decisions are not dependent on frontend logic.

The Fraud Intelligence module uses interactive transaction relationship graphs to support investigation workflows.

For Payback AI, we developed an evidence extraction pipeline that processes uploaded documents, extracts candidate transaction information, and allows users to verify the results before generating complaint drafts.

We also integrated PostgreSQL to maintain investigation records and tested the core workflows through automated tests and end-to-end validation.

  1. Challenges we ran into

Building PayShield AI involved several technical challenges:

  • Payment security: Designing a reliable policy engine that evaluates transactions before payment order creation while supporting human approval.
  • Payment integration: Implementing the PayPal Sandbox order creation, buyer approval, and capture workflow.
  • OCR accuracy: Extracting structured transaction information from scanned receipts and documents with different layouts and image quality.
  • Data consistency: Connecting transaction information, investigation cases, and uploaded evidence across multiple modules.
  • Complex integrations: Integrating data visualization components and ensuring compatibility between different frontend and backend technologies.
  • Deployment:Configuring environment variables, database connectivity, authentication providers, and separate OCR service integration.

We addressed these challenges through modular development, server-side validation, structured APIs, manual evidence verification, and repeated integration testing.

  1. Accomplishments that we're proud of

We are proud to have developed a unified payment security platform rather than building an isolated fraud detection feature.

Our major accomplishments include:

  • Successfully implementing all three core modules: AgentPay Firewall, Fraud Intelligence, and Payback AI.
  • Building a deterministic payment firewall with ALLOW, REVIEW, and BLOCK decisions.
  • Integrating PayPal Sandbox payment workflows.
  • Developing interactive transaction relationship visualizations.
  • Implementing AG Grid and AG Studio integrations.
  • Building an OCR-assisted evidence extraction and verification workflow for transaction documents.
  • Implementing automated complaint draft generation.
  • Integrating PostgreSQL for persistent investigation data.
  • Completing core automated testing and end-to-end workflow validation.
  • Deploying the application through Render.

Most importantly, we connected payment prevention, fraud investigation, and evidence-assisted recovery into one coherent ecosystem.

  1. What we learned

Developing PayShield AI taught us that payment security requires more than simply identifying suspicious transactions.

We learned:

  • Why security decisions must be enforced on the backend rather than trusted to the frontend.
  • How to integrate third-party payment APIs and implement secure transaction workflows.
  • How OCR pipelines transform unstructured documents into structured information.
  • How to build interactive data visualization systems for investigation workflows.
  • The importance of database persistence, authentication, and API validation.
  • How to manage complex integrations across multiple technologies.
  • Why human verification and explainability are essential when handling financial evidence.

We also learned that building a complete product requires balancing technical innovation, usability, security, and real-world limitations.

  1. What's next for PayShield?

PayShield AI is a foundation for a more comprehensive security ecosystem for autonomous financial transactions.

Our future roadmap includes:

  • Advanced Fraud Intelligence: Introduce behavioral analytics and machine learning-based anomaly detection.
  • Real-Time Monitoring: Monitor transaction activity continuously and identify unusual patterns.
  • Smarter Payment Policies: Introduce persistent daily spending aggregation and more advanced policy administration.
  • Multi-Provider Integration: Expand support for additional payment gateways and financial platforms.
  • Enhanced Recovery Assistant: Improve document classification, evidence extraction, and complaint preparation.
  • Investigation Collaboration: Introduce richer analyst collaboration, audit trails, and investigation reporting.
  • Enterprise Readiness: Strengthen authorization, security controls, monitoring, and data protection.

Our long-term vision is to make PayShield AI a trusted security layer between autonomous AI agents and the financial systems they interact with.

PayShield AI — Because every payment deserves protection, every threat deserves investigation, and every victim deserves a path toward recovery.**

Built With

Share this project:

Updates

Submission history