Inspiration

Small sellers on PayPal don't lose disputes because they cheated. They lose because they can't prove they didn't. The proof is scattered across WhatsApp chats, courier slips and memory, and a single mistyped tracking number can lose a $120 sale. When PayPal holds money or limits an account, the seller is asked for evidence they never organised.

I wanted to flip the order: prove it before they ask.

What it does

Ostraca keeps an AI-checked proof record for every PayPal sale. It has three flows:

  1. Capture proof. The seller uploads a courier receipt (photo or PDF), a voice note in Tamil, Hindi or English, or types the details. Claude reads it and suggests values. Deterministic code verifies them, including the UPU S10 check digit on international tracking numbers, so EE123456789IN is rejected and EE123456785IN passes. The seller confirms, approves, and only then is the tracking filed to PayPal.
  2. Answer disputes. When a buyer reports "item not received", the dispute appears in Ostraca, linked to its sale. Ostraca drafts a response from verified facts only, and every sentence cites a numbered fact. Code blocks any tracking number, amount or date that isn't in the record. The seller approves, and the evidence goes to PayPal only if PayPal currently allows it. The status shown is always re-read from PayPal.
  3. Limitation pack (simulated). The sandbox can't place real account limitations, so this flow is clearly labelled SIMULATED. It pulls recent transactions through Transaction Search, matches each to its proof, and builds a printable document with the gaps listed.

Every sale gets a readiness score computed in code, not by AI:

$$R = \sum_i w_i c_i,\quad c_i \in {0,1}$$

with weights of 25 (tracking verified), 30 (tracking filed with PayPal), 20 (delivery confirmed), 15 (amount reconciled) and 10 (buyer and city match). Fields that still need review don't count until the seller confirms them.

AI suggests. Code verifies. You approve. PayPal decides. Ostraca never claims it can unfreeze money or win a dispute.

How we built it

  • App: Next.js 16, React 19, TypeScript, Tailwind v4, shadcn/ui, GSAP animation, AG Grid for the proof ledger.
  • Data: Postgres on Neon with Drizzle ORM. Original evidence is stored unchanged with a SHA-256 hash, and every action goes to an append-only audit log.
  • PayPal APIs: Orders v2 (checkout and capture), shipment tracking, Disputes v1 (list, show, provide evidence), webhooks with signature verification, and Transaction Search.
  • AI: Claude reads receipts and PDFs and drafts the dispute response, using structured tool output. OpenAI transcribes voice notes.
  • Safety by design: sandbox-only guard, an approval queue with idempotency keys for every PayPal write, rate limits and an AI daily budget cap, upload type checks, and escaped output.
  • Quality: more than 80 automated end-to-end tests (Playwright) covering the flows, bad input, forged webhooks and AI-off fallbacks.
  • Hosting: Render.

Challenges we ran into

  • Sandbox quirks. An Indian sandbox seller can't receive USD, so I moved to a US Business seller and Personal buyer.
  • Dispute stages. Some sandbox disputes arrive as chargebacks under review, where PayPal accepts no seller evidence. Ostraca checks PayPal's links first and shows PayPal's real message instead of forcing a call.
  • PayPal's evidence schema. My first evidence request was rejected with EVIDENCE_TYPE_IS_NOT_ALLOWED. I rebuilt the payload from PayPal's published schema and the evidence type PayPal itself requested (PROOF_OF_FULFILLMENT), and the evidence was accepted.
  • Keeping AI honest. A drafting model will happily invent facts. Requiring a citation for every sentence, and checking every number in code, fixed that.
  • No real limitations in the sandbox. I simulated that flow and labelled it everywhere.

Accomplishments that we're proud of

  • A complete sandbox run: a real checkout, a mistyped tracking number caught by code, tracking filed, a buyer's dispute, a cited draft, and evidence accepted by PayPal, with the status changing as PayPal reports it.
  • The AI can't make up a tracking number or a date, because code checks it.
  • It works for sellers who speak Tamil, Hindi and English, by voice or by photo.

What we learned

PayPal's dispute lifecycle has strict rules about when evidence is allowed and what type it can be. The most trustworthy use of AI here is to read and draft, while code verifies and the human decides. Showing PayPal's real status, and PayPal's real refusals, builds more trust than hiding them.

What's next for Ostraca

  • Let each seller connect their own PayPal account through PayPal's partner onboarding, plus real user accounts.
  • Attach receipt files to the evidence PayPal receives. Today it sends the text and tracking details.
  • Pull courier status automatically to unlock delivery proof.
  • Add a service-seller mode (invoice and delivery proof).
  • Add deadline reminders, and test against real, not simulated, limitation notices.

Ostraca is an independent hackathon project. It is not affiliated with or endorsed by PayPal. It runs only on the PayPal sandbox, and no real money moves. Claude was used inside the product, and AI coding assistants helped build it.

Built With

Share this project:

Updates

Submission history