Inspiration

When a customer files a PayPal dispute, a small shop has a few days to answer. The proof is scattered across tracking pages, chats, the listing and order history, so sellers guess, miss deadlines, or just refund. Nobody tells them which disputes are worth fighting.

What it does

Dispute Defender reads a dispute, gathers the evidence, builds an evidence pack, scores how winnable it is (0-100), and recommends CONTEST, CONTEST WITH CAUTION or ACCEPT AND REFUND. A Gemini agent then drafts the seller reply from verified facts only. A human approves; nothing is sent automatically. It refuses to contest a duplicate charge its own order records confirm, and skips tiny unprovable claims.

What is real and what is simulated

Real: PayPal Sandbox sales (Orders v2 captures, fees and status read back from PayPal on every run), and a PayPal Customer Disputes API client (list, get, provide-evidence, accept-claim, send-message) wired to the sandbox host. Simulated: the disputes themselves and the merchant's shipping, chat, listing and risk records. A merchant app cannot file a dispute (that is a buyer-side call), so the disputes follow the Disputes API schema and are linked to real sandbox capture IDs. All people and emails are fictional.

How we built it

Node 22, zero dependencies. A deterministic evidence engine sets the score and decision (unit tested). The model only writes the reply; it never decides numbers. Security: sandbox host allowlist, keys only in environment variables, escaped HTML, localhost dashboard, repo and git history audited for secrets, buyer text treated as untrusted in prompts.

Challenges

Merchant credentials cannot create disputes, so we built an honest simulation layer instead of faking API output. Free-tier LLM limits meant adding retries and a clearly labelled template fallback.

Accomplishments

End to end run: 6 real sandbox sales, 6 simulated disputes, $559 at stake, $382 worth contesting, 3 better refunded.

What's next

Live dispute webhooks, carrier tracking lookups, and a one-click approve and send step through provide-evidence.

Work done during the submission period

All code was written after the hackathon opened, starting October 4, 2026. The public repo history shows it.

Built With

Share this project:

Updates

Submission history