Inspiration
A buyer opens a PayPal dispute: her headphones never arrived. To answer before PayPal's deadline, a merchant's support person opens the order portal, the carrier's tracking page, the support inbox and the store policy, copies details between them, and then picks a response in PayPal. The tools don't talk to each other, and a wrong refund is money gone.
What it does
RefundOps pulls open disputes from PayPal's Disputes API, then a browser agent investigates them across the merchant's tools and the PayPal record.
Every fact it records comes with:
- A quote copied word for word from its source
- The page URL
- A screenshot
The code checks each quote against the page before accepting it.
From those facts, RefundOps recommends one response, limited to the actions PayPal allows for that dispute and checked against the refundable amount and the deadline.
The merchant can approve, edit or reject the recommendation. Only after approval does the executor call PayPal (accept-claim or make-offer, with an idempotency key), and then it reads PayPal again to confirm the result.
Two demo cases:
- $120 parcel returned to sender: Full refund through
accept-claim. PayPal then showed the capture as refunded. - $90 parcel delivered without a signature: $20 goodwill offer through
make-offer, inside the store's 30% cap.
The second case's inbox holds an email telling the agent to refund $500. RefundOps records it as untrusted and ignores it.
How I built it
- Merchant console: Django 6.1, HTMX, Alpine.js, Tailwind and AG Grid.
- AI inference: Vultr Serverless Inference using GLM-5.3 and GLM-5.3-flash.
- PayPal integration: Sandbox-only REST client covering OAuth, Disputes, Orders, Payments and webhook signature checks.
- Merchant tools: Four mock merchant sites standing in for real tools.
- Credential security: Saved logins stored in an AES-256-GCM vault that the model never sees.
Challenges
- Keeping the model honest:
Built With
- django
- javascript
- langchain
- python

