Inspiration

What it does## Inspiration

Small sellers lose disputes they could have won and waste time on ones they cannot, because they miss the 10-day window, send weak evidence, or cannot tell whether a case is worth fighting.

What it does

When a buyer opens a PayPal dispute, Dispute Copilot gets the webhook, matches it to the order, builds an evidence pack and checks the carrier's tracking. An AI advisor recommends Fight, Offer a partial refund, or Accept, with reasons and a confidence score, and drafts the letter. The seller reviews one page, can edit the letter, and approves. Only then does the app call PayPal (provide evidence, make an offer, accept the claim, or send a message).

Built so the AI cannot cause harm

Nothing is sent without the seller's approval. A fight is downgraded to an offer when required evidence is missing, and the gaps are listed. Offer amounts are validated in code, only actions PayPal currently allows can be chosen, and when the carrier reports a parcel lost the app forces a full refund because refunding is the fair outcome. Each PayPal action carries an idempotency key, so a retry never sends twice.

Proof of delivery or non-delivery

The sandbox has no real courier, so we built one: every demo order gets a tracking page with a scan history. It either delivers with an electronic signature or loses the package. That gives each dispute real evidence to judge, in both directions.

How we built it

TypeScript monorepo: Node 22 and Express on the server, React and Vite on the web, Postgres on Render (PGlite for local work and tests). A job queue in the database (FOR UPDATE SKIP LOCKED, leases and retries) runs the analysis and the PayPal calls. Evidence is built by plain code, not AI. The AI writes the recommendation and letter through a server proxy, Gemini first and Groq as the fallback, so no AI key reaches the browser.

Sponsor tools

PayPal sandbox (Orders API for checkout, Disputes API, signed webhooks). AG Grid: AG Studio and AG Studio React with two custom widgets (Action needed, Money protected), a chart set, a custom night and day theme, and the Studio Agent Framework for a read-only Dispute Analyst agent that cannot approve or send anything. Render for hosting and Postgres.

Challenges

PayPal's sandbox webhooks can arrive minutes late, and the sandbox refuses the seller's own settle step, so a fought case stays under review until the buyer responds. We documented both in the guide. The sandbox also has no real parcels, so we had to build our own carrier to give every dispute evidence in both directions.

Results so far

On 12 seeded cases the evidence builder found 26 of 36 required items (72%) automatically and the guardrails stopped 6 of 12 over-confident fights. This measures evidence and guardrails, not win rates. Verified live on both paths: a delivered parcel was recommended Fight (confidence 100, 3 of 3 evidence items) and sent to PayPal after approval; a lost parcel was forced to Accept (confidence 95) and resolved when the buyer accepted the refund.

What is next

A prevention agent that spots dispute signals before they escalate, similar-case search over past wins, and email alerts before deadlines.

Try it

Live demo: https://dispute-copilot-zv53.onrender.com and the judge guide at https://dispute-copilot-zv53.onrender.com/guide with the judge login and sandbox buyer account. Sandbox only, no real money. Demo video: https://youtu.be/wmQVIW6cm_s Source code: https://github.com/srinithishs004/dispute-copilot

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Dispute Copilot

Share this project:

Updates

Submission history