DisputeGuard AI: An Autonomous Financial Dispute Agent for E-Commerce Merchants
💡 Inspiration
If you’ve ever run an online store, you know this nightmare: a buyer receives a perfect item, damages it themselves (or swaps it with their old, broken one), and files a dispute demanding a full refund. In the industry, we call this "Friendly Fraud," and it is absolutely crushing small-scale e-commerce merchants and MSMEs.
Right now, fighting these claims is a losing battle for small sellers. Marketplace dispute systems are tedious, and writing a formal, legally-tight dispute letter takes time and expertise most everyday merchants just don't have. They usually end up just taking the financial hit. We built DisputeGuard AI to level the playing field and give these merchants their hard-earned money back.
🚀 What it does
DisputeGuard AI is an autonomous financial dispute manager. Think of it as a 24/7 digital legal analyst for e-commerce sellers. Here’s how a merchant uses it:
- Multimodal Risk Analysis: The merchant pastes the buyer’s angry complaint text and uploads two photos: the "proof" the buyer submitted vs. the snapshot taken at the warehouse during packaging.
- Autonomous Verdicts: The AI agent handles the heavy lifting. It scans both images simultaneously, catches visual anomalies (like user-inflicted wear vs. factory-new packaging), calculates a fraud probability score (1-100), and delivers a clear verdict.
- Instant Counter-Claims: If it smells fraud, the agent automatically drafts a highly professional, ironclad Official Dispute Letter in formal Indonesian, tailored specifically to marketplace regulations and backed by the visual evidence. The merchant just clicks copy, submits it, and saves their cash.
🛠️ How we built it
We wanted this to feel fast, modern, and production-ready, so we spent a lot of time on both the brains and the beauty:
- The UI & Dashboard: Built with Next.js, Tailwind CSS, and Shadcn UI components. We prototyped it via MeDo.dev to give it a stunning, modern Glassmorphic interface that makes complex financial metrics digestible at a glance.
- The AI Brain: Powered by Google Gemini 1.5 Flash via Google AI Studio. Gemini's massive context window and native multimodal capabilities made it the perfect engine to compare multiple high-res images at the same time and run complex reasoning.
- The Database & Intelligence Layer: We used Supabase/PostgreSQL to handle live transactional data syncing. Crucially, we integrated MongoDB Atlas Search as our core intelligence engine. By indexing past sengketa data, MongoDB Atlas Search allows the system to instantly run fuzzy-matching search queries across historical fraud logs, helping the AI agent uncover recurring scam patterns and buyer syndicates in milliseconds.
🧠 Challenges we ran into
The trickiest part wasn't just getting the AI to recognize what was in the pictures—it was teaching it contradictory reasoning. The AI needed to understand the timeline: if Image A shows a filthy, ripped shoe, but Image B proves it left the warehouse pristine on the exact same day, that's a massive red flag. We solved this by refining our system prompting, forcing Gemini to act less like an object detector and more like a skeptical forensic investigator.
🏅 Achievements that we're proud of
- Flipping a generic security concept into a laser-focused, high-value B2B fintech tool that actually solves a real-world revenue leak.
- Getting Gemini 1.5 Flash to generate dispute letters with such a precise, formal Indonesian legal tone that you’d swear an actual lawyer wrote them—all in less than 5 seconds.
- Nailing that premium glassmorphism dashboard styling without breaking the data flow.
📚 What we learned
Building this made us realize the true difference between a simple chatbot and an AI Agent. A chatbot just spits out answers to text. A true agent takes raw, messy inputs (text + unorganized photos), analyzes the context, makes an executive decision, and outputs a concrete, actionable asset that saves a business owner real money.
🔮 What's next for DisputeGuard AI
- MongoDB MCP Server Integration: We plan to expand our MongoDB architecture by implementing an MCP server. This will let merchants use natural language to query their database directly via Gemini (e.g., "Gemini, pull up all fraud patterns coming from user accounts in Jakarta this month").
- Direct Marketplace Sync: Connecting our backend via webhooks directly to Shopee, Tokopedia, and TikTok Shop APIs so these dispute letters can be auto-submitted the moment a bad claim is opened—zero manual copy-pasting required.

Log in or sign up for Devpost to join the conversation.