Inspiration#Inspiration I kept hearing streamers on Twitch talk about PayPal chargebacks and payments that turned out to be scams. Big companies have whole fraud teams to catch that. A small business owner has themselves. I wanted to give them a second set of eyes.

What it does RiskLens AI is a payment-risk dashboard for small business owners who take payments through PayPal.

  • Run a real PayPal Sandbox checkout right from the app. Approve it, and RiskLens captures the payment and scores it automatically.
  • Transparent scoring: every score shows exactly how each point was earned. No black box.
  • AI investigation: the server pulls the payment directly from PayPal (status, seller protection, fees) and the AI explains it in plain English. Every point the AI makes must cite real PayPal data or it gets rejected.
  • Honest about missing data: PayPal capture data has no customer history, so RiskLens doesn't apply those rules instead of guessing.
  • Review workflow: mark payments reviewed and the queue updates.

The AI never sees customer names and never moves money. The owner makes the final call.

How I built it

  • PayPal: Orders v2 and Payments v2 (Sandbox) with server-side OAuth to create orders, capture them, and fetch capture details
  • AI: OpenAI with strict JSON output, grounded only in PayPal-returned facts
  • AG Grid: the payment investigator, with sorting, filtering, quick search, a Source column, score tooltips, highlighted high-risk rows, and CSV export
  • Render: hosts the whole app as one web service
  • Stack: React + TypeScript frontend, Node.js + Express backend

Challenges I ran into

Getting the PayPal Sandbox checkout working end to end: logging in with a Sandbox buyer account, then capturing the payment automatically when the buyer returns. I also had to keep the scoring honest when PayPal doesn't provide certain data.

Accomplishments that I'm proud of

A full loop with real PayPal data: pay, approve, capture, score, AI explanation, and review, all live on the web.

What I learned

How payment APIs work (orders, approvals, captures), how to keep AI grounded in real evidence, and how to deploy a full-stack app.

What's next for RiskLens AI

Merchant history over time so frequency and new-customer rules can apply to live data, plus PayPal webhooks for instant updates.

Share this project:

Updates

Submission history