Inspiration

We started by thinking about the person on the other side of a PayPal dispute. Not the buyer or the seller, but the investigator who has to figure out who's right. They have a buyer saying the watch arrived scratched and wrong, a seller with a tracking number, a handful of photos, and a deadline. They dig through five different places to piece the story together, and then they make a call that moves real money. That felt like the perfect place for AI to help. Not to replace the investigator, but to do the tedious gathering, point out what the evidence actually says, and double-check the decision before it goes out. We also wanted a human to always have the final say, because when money is involved, "the AI said so" isn't good enough.

What it does

ResolveIQ is a workspace for dispute investigators and their managers.When a buyer reports a problem in PayPal's Resolution Center, the case shows up in ResolveIQ within seconds and goes straight to whichever investigator has the lightest load. Everything they need is already there: what the buyer said, the photos they uploaded, the order, the payment and the seller's shipping tracking. Gemini reads all of it and writes a short brief explaining both sides, with every claim linked to the evidence behind it. It can also draft the messages to the buyer and seller. Once the investigator makes a decision, an AI reviewer looks at it. If it agrees, ResolveIQ sends the ruling back to PayPal, and if the buyer won, they get their refund automatically. If the AI disagrees and overturns the decision, the investigator gets a strike. Three strikes and the manager hears about it; ten and the account is paused. Investigators can push back, too. If they think the AI got it wrong, they report it, and the manager looks at both sides and the AI's reasoning. The manager can overturn the AI, which removes the strike and becomes a lesson the AI learns from, or keep its decision. The dispute queue is built on AG Grid, so investigators can sort, filter any column and export to CSV. Every single step, including every call to PayPal, ends up in an activity log.

How we built it

The backend is Python with FastAPI, SQLAlchemy and SQLite. The frontend is React and TypeScript with Vite, Tailwind, TanStack Query and AG Grid. Google Gemini handles the briefs, the drafted messages and the reviewer.On the PayPal side we used the sandbox for real, not a mock. We used the Disputes API to read cases and send rulings back, and Webhooks to hear about new disputes the moment they're filed. Orders, Payments and Shipment Tracking filled in the purchase, the money and the delivery. Setting up a fresh sandbox story used to take a long checklist of manual steps, so we wrote a script that does it in one command. It creates the purchase, captures the payment and adds the tracking number. The only manual part left is the buyer reporting the problem, which is exactly how it happens in real life. For assigning cases, we kept it simple and fair. Each new case goes to the investigator with the fewest open cases, and ties go to whoever has had fewer cases overall:

$$i^{*} = \arg\min_{i}\ \big(\text{open}_i,\ \text{assigned}_i\big)$$

Challenges we ran into

The first surprise was speed. We'd file a dispute in the sandbox and then wait... and wait. PayPal's dispute list took around three minutes to show new cases, which killed the "it just appears" experience we wanted. Switching to webhooks fixed it, and now cases land in seconds, with polling as a backup. The second was PayPal's rules about what you can do and when. Our first attempts to rule on a case or accept a claim kept getting refused because the dispute wasn't in the right state. We ended up making ResolveIQ follow the links PayPal itself returns for each case. It escalates first, then rules, falls back to a direct refund if needed, and tries again whenever PayPal updates the case. The data also wasn't shaped the way we expected. The buyer's details, their notes and their evidence were nested in places we didn't anticipate, so we rebuilt our parser around real sandbox responses instead of guesses. And the hardest part wasn't technical at all. We had to decide how much power the AI should have. When does its ruling stand? What happens when an investigator disagrees? How does a manager review a case without reopening it? We went through a few versions before it felt right.

Accomplishments that we're proud of

The moment the whole thing worked end to end. A buyer reported a $349 smartwatch that wasn't as described. The case appeared in ResolveIQ in seconds, the investigator made a call, Gemini checked it, and the buyer's $349.00 refund landed on PayPal without anyone touching anything in between. We're also proud that the AI shows its work. Every claim in a brief points back to a real piece of evidence, so nobody has to just trust it. And the whole thing is backed by over 400 automated tests.

What we learned

We learned a lot about how disputes actually work behind the scenes: the case lifecycle, how evidence is handled, and how a ruling turns into a refund.We also learned that putting AI into a decision about someone's money changes how you design it. It needs to show its evidence, it needs a second check, and a person needs an easy way to say "no, that's wrong."On the technical side, we learned to trust real API responses over documentation, and that webhooks plus a little polling is far more reliable than either one alone.

What's next for ResolveIQ

  • Deploying it and connecting it to live PayPal accounts, beyond the sandbox.
  • Letting the AI properly learn from managers' overturns over time.
  • Supporting more kinds of disputes and evidence, such as carrier proof of delivery and chat history.
  • Giving managers team insights: how consistent decisions are, how fast cases close, and how often the AI and investigators agree.

Built With

  • ag-grid
  • ai
  • fastapi
  • google-gemini
  • httpx
  • javascript
  • paypal-disputes-api
  • paypal-orders-api
  • paypal-payments-api
  • paypal-webhooks
  • pydantic
  • pytest
  • python
  • react
  • react-router
  • recharts
  • rest-api
  • sqlalchemy
  • sqlite
  • tailwindcss
  • tanstack-query
  • typescript
  • uvicorn
  • vite
  • vitest
Share this project:

Updates

Submission history