Dispute Copilot - AI Powered PayPal Dispute Management

Inspiration Payment disputes are one of the biggest issues online sellers face; particularly, small sellers without full time staff to dedicate to them. In the event that the dispute has been filed with Paypal, the seller needs to know the reason for the complaint, gather transaction details, check the shipping details, and provide information to support them prior to the deadline for response. Everything is on various tabs and may be daunting and stressful. And yet another major concern with the use of generic AI tools in dispute management is that although the AI can produce convincing responses, it may invent data or make factual claims that do not match the evidence of the transaction. One unsupported claim, such as successfully establishing delivery for an item without confirmed tracking, could do the seller in. That motivated us to create Dispute Copilot - an AI dispute management platform that not only creates but substantiates each statement with authentic proof. What drives us is: AI writes. Evidence verifies. Sellers decide. What We Built Dispute Copilot is an online, AI-powered product that interfaces with PayPal Sandbox to provide sellers with a single dashboard that allows them to handle payment disputes. This rollout combines PayPal fetching, specialised AI agents, deterministic verification logic, and human approval into a single workflow

1. Intelligent Evidence Collection

The application retrieves relevant dispute information from PayPal, including:

  • Transaction and payment details.
  • Purchased item information.
  • Seller Protection status.
  • Shipment and tracking information.
  • Buyer claims and dispute requirements. The gathered data is transformed into an organized list of numbered evidences references (E1, E2, E3….) and buyer claims (C1, C2, C3…) are distinguished as claims. This prevents claims from being made as if they were fact. # 2. Multi-Agent AI Response Generation Our approach included creating two custom AI agents using the Microsoft Agent Framework and the Gemini API. Writer Agent: Examines the buyers assertions and evidence available and constructs a professional, well-organized answer. Each sentence is linked to its justification (ex, evidence) Verifier Agent: Assesses every sentence separately relying solely on the evidence it cites. It points out the unsupported assertions and provides verification results and explanations. When a sentence is unverifiable, it is returned for one more rewrite. After that, it will be eliminated if it is still unsupported.

This thus builds an evidence-based pipeline for producing the responses in the dialogue, rather than just letting AI to generate texts without any constraints.

3. Intelligent Resolution Recommendations

Dispute Copilot also alerts you to when the evidence at hand might not be enough to support a dispute. If shipment tracking isn't available in an item-not-received case, you might have up to two choices to resolve a dispute: You can choose to accept the case, or provide a refund after the item is returned. This evidence allows sellers to do better than make unsupported arguments.

4. Buyer Communication

Separate communication workflow for reaching a customer. Sellers can send professional messages with order details and shipping information included. These messages also go through the same evidence review process and need to be approved before they're sent.

5. Human-in-the-Loop Approval

We feel financial decisions should never be made purely as a result of an AI decision. As a result, you must have seller consent before Dispute Copilot submits verified responses, sends messages to buyers, or takes any of the supported dispute resolution actions. The most recent authentic reply/message can be only been submitted. For monetary transactions, the text is fixed and seller confirmation is necessary.

6. Dispute Dashboard and Analytics

The app also features:

  • Centralized dispute inbox with card & grid views.
  • Advanced filters, sorts, and CSV export with AG Grid.
  • Reply deadline monitoring.
  • Separate conversations with PayPal and buyers.
  • Interactive analytics using AG Charts.
  • Real-time agent progress updates. How We Built It Dispute Copilot, our platform. We built Dispute Copilot on a full-stack architecture. Frontend
  • React
  • TypeScript
  • Vite
  • AG Grid
  • AG Charts Backend

  • Python 3.11

  • FastAPI

  • Server-Sent Events (SSE) Artificial Intelligence and Agent Architecture

  • Microsoft Agent Framework

  • Google Gemini API (Gemini 3.5 Flash-Lite)

  • Specialized Writer and Verifier agents Payment Integration

  • PayPal Agent Development Toolkit

  • PayPal REST APIs

  • PayPal Sandbox environment Testing and Deployment

  • pytest

  • Playwright

  • axe-core

  • Docker

  • Render

  • GitHub Actions

    System Workflow

  1. PayPal provides dispute and transaction information.
  2. The backend gathers and organizes the evidence at your disposal.
  3. Whether evidence is present and the ability to resolve it.
  4. The Writer Agent combines evidence and produces an evidence-based response.
  5. The Verifier Agent verifies each sentence with the research it cites.
  6. The unsupported commentary is not rewritten but is deleted if appropriate.
  7. The seller concurs with the final verified response.
  8. The application utilizes PayPal APIs to submit the approved action.

Obstacles We Encountered Building Dispute Copilot involved several technical challenges.

  1. Integrating with PayPal API It was hard to understand how it works: how disputes go through its life-cycle, PayPal processes and what different dispute actions look like, what kind of information could be attached to a dispute and in what format. Some actions were accessible through PayPal Agent Toolkit; most required direct integration with the REST API. We handled this by integrating the dispute and retrieval tracking toolkit with direct PayPal REST API calls for submitting evidence, buyer messaging and supported resolution actions.
  2. Preventing AI Hallucinations One of our biggest challenges was trying to prevent AI based responses with unsupported statements. Asking an AI model to be accurate was not enough. We added structured evidence referencing, citation verification, sentence-level validation, and a controlled rewrite-and-remove process.
  3. Designing Reliable Multi-Agent Coordination Integrating the two agents, Writer and Verifier, was a very delicate procedure. (We wrote our orchestration code in Python so that AI agents select and verify language, but all citations, retries, evidence, and submissions are governed by deterministic code.)
  4. Implementing Safe Financial Actions These are things that may have an impact on the money of a seller. The system is set up in a way that AI does not have the option to respond on its own or perform any money related actions. Seller approval and action text add another safety layer.
  5. Creating a Reliable Demonstration Environment Payment integration and live AI calls can be unpredictable. Were live AI calls to the public-demo site, we ran recorded AI-run replays so users could view agent activity and verification results without requiring a live call. Live AI and submission can be accessed separately What We Learned Using Dispute Copilot, I learned that creating an AI-powered app is about a lot more than just attaching an LLM to a user interface. We obtained hands-on experience in: Using third-party payment APIs within real-world API workflows. Developing expert AI agents with the Microsoft Agent Framework. Implementing structured AI outputs and evidence-grounded generation. Orchestrating complex multi-agent workflows with deflaked retries and assurance.

Building asynchronous backend communication using Server-Sent Events. Implementing human-in-the-loop controls for sensitive financial operations. Testing full-stack applications using pytest and Playwright. Improving accessibility and building production-oriented deployment workflows. Most of all we learned that trustworthy AI is not more content, it is what you know that the system can actually prove. What's Next? There are several areas we can expand Dispute Copilot on: Support additional payment providers Expand coverage to more dispute categories. Introduce multilingual buyer communication. Add persistent dispute history and advanced reporting. Improve evidence extraction and verification capabilities. Support distributed processing with scalable deployment and durable storage. Our vision for the future is to bring evidence-driven dispute management to companies of all sizes. Final Thought Dispute Copilot is based on one fundamental philosophy: sellers should never have to sacrifice evidence-based decisions in exchange for faster AI. This real time monitor for tax implications is safe because of the use of many specialized AI agents, deterministic verification, PayPal API integrations and human approval. Dispute Copilot - AI that replies to PayPal disputes, the place each sentence takes you again to its proof.

Share this project:

Updates

Submission history