-
-
No sealed evidence pack for this order? The agent refuses to guess - ESCALATE hands the full report to a human.
-
Repeat-claimant radar: one buyer, 4 disputes, the same claim photo reused across disputes - caught by perceptual-hash matching.
-
Genuine damage, judged fairly: sealed pack photo vs claim photo - jagged crack web, first-time buyer. SETTLE, $44.50 offered on its own.
Inspiration
Online sellers lose PayPal disputes they should win — not because they were wrong, but because the proof that an item left the warehouse in perfect condition is scattered or gone by the time a "broken item" claim lands. The seller scrambles for a photo they never took; the buyer wins by default. We flipped the timeline: seal the evidence before the dispute exists. And then we went one step further — the agent doesn't just defend. It judges.
What it does
PackProof is an AI dispute judge for online sellers, built on the PayPal sandbox. Layer 1 — Evidence sealed before the dispute exists. At pack time, every order gets a sealed evidence pack: a photo of the item, its weight, and a timestamp. When a dispute arrives, the agent retrieves the pack instead of scrambling for proof. Layer 2 — The 3-way verdict. On a new dispute, the agent compares the customer's claim photo against the sealed pack photo and issues exactly one verdict: DEFEND — the claim doesn't hold up → the evidence pack and AI comparison report are submitted via the Disputes API (provide-evidence) SETTLE — the damage reads genuine → a partial-refund offer is sent automatically (make-offer), sized by damage severity ESCALATE — the agent isn't sure → a human gets the full report. Ambiguity is never auto-decided. Layer 3 — Repeat-claimant radar. Dispute history is scanned for buyers who file again and again, and claim photos are hash-matched across disputes — the same "damage" photo used twice is caught instantly. The demo shows both sides of judgment in under 3 minutes: a fake claim (wrong item, photo taken before delivery, reused photo, third dispute from the same buyer) — DEFEND, score 100, evidence submitted, sandbox adjudication → seller wins. And a genuine one (same bottle, jagged transit crack, first-time buyer) — SETTLE, 50% refund ($44.50) offered on its own. Judgment, not a hammer.
How we built it
Backend: FastAPI + SQLite, one dashboard — dispute inbox, sealed evidence packs, side-by-side photo comparison, verdict badges, repeat-claimant radar, action log PayPal: Sandbox REST, Disputes API v1 (/v1/customer/disputes) — list_disputes, provide-evidence, make-offer, plus sandbox-only adjudicate to close the loop in the demo. LIVE client + SIM lifecycle simulator (default without credentials), so the demo never dies The verdict engine: the vision layer only scores signals — deterministic image math (foreground colour signatures for item identity, perceptual hashes for photo reuse, edge density + PCA linearity separating a jagged crack web from a single straight cut). Arithmetic and gates decide. Every point appears on the dashboard next to the verdict — no black box The gates, in order: reason routing (not-as-described → photo path; item-not-received → tracking path) → $15 money gate (fighting costs more than the item — unless the claim photo is reused, serial patterns beat the money gate) → hard gates to ESCALATE (no pack, unreadable photo, low confidence — the agent never guesses) → fraud score → bands ≥60 DEFEND / 30–59 ESCALATE / <30 SETTLE at 20%/50%/100% by damage severity API facts we verified the hard way: provide-evidence must be multipart/form-data (JSON part named input, files as file1, file2… — multipart/related silently drops files); dispute webhooks arrive minutes late in the sandbox, so PackProof polls instead of waiting on them Tests: 21/21 passing — verdict gates and bands, vision math on the seeded photos, full API flow (evaluate → defend → adjudicate, settle amounts, radar)
Challenges we ran into
provide-evidence silently dropping files until we switched from multipart/related to multipart/form-data — the API returns success while your evidence vanishes Sandbox dispute webhooks arriving minutes late — the demo can't wait on them, so polling won Making "judgment" demo-able: a verdict is only convincing if every point behind it is visible, so the score breakdown had to be a first-class UI element, not a log line The $15 money gate vs the serial-fraud exception — a cheap claim from a repeat claimant is exactly the one worth fighting, so the reuse exception had to outrank the gate
Accomplishments that we're proud of
A working 3-way judge, not a one-button defender: DEFEND 100 on the fake claim, SETTLE $44.50 on the genuine one, and a $12 claim that trips the photo-reuse exception — all in one seeded demo The repeat-claimant radar catching the same photo across two disputes by perceptual hash The full sandbox Disputes lifecycle verified live (OAuth + Disputes API smoke test passed Nov 8) and the whole loop closable in the demo via sandbox-only adjudicate 21/21 tests, public repo, zero secrets in it (.env.example only)
What we learned
Judges — human and AI — don't doubt your UI, they doubt your evidence path. Making every verdict point visible on the dashboard changed how the whole project reads: it's not "AI says so", it's "here's the +40, here's why, here's the photo". And the cheapest disputes taught the most: the $15 gate exists because fighting costs more than the item — but only until the same photo shows up twice.
What's next
Vision-LLM provider hook (VISION_API_*) already stubbed — swap deterministic vision for a vision model in production while keeping the gates as the decision layer Seller-side pack capture: phone camera flow at the packing bench, so the sealed pack is created where the box is, not in a demo script Multi-marketplace evidence packs (same sealed-pack pattern, other dispute APIs)