Inspiration

A PayPal dispute is a race against a deadline, and the response is only as good as the evidence behind it. Sellers can miss a deadline, forget a tracking number, or send a reply that says more than their records can prove. AI makes this worse if it is allowed to guess, because a confident, invented claim in a dispute response can do real damage. We wanted AI to help sellers move faster while making it impossible for it to say anything their records cannot back up.

What it does

Tiramisu syncs a seller's disputes from the PayPal Sandbox and shows each response deadline. For every dispute it checks the records that dispute type needs (order, payment, tracking, delivery confirmation and so on) and shows what is found and what is missing.

An AI then drafts the response. Every statement must link to a real record. A built-in check removes any statement that no record supports before the seller sees it. Buyer messages that try to give the AI instructions are flagged and kept away from the model.

Nothing reaches PayPal on its own. Sending a response, uploading tracking or issuing a refund first becomes a pending action. The seller reads the exact text and confirms with their password. Refunds above a limit the seller sets are blocked, even after approval. Every action is saved in a hash-chained history that the app can verify. Sellers can connect their own PayPal Sandbox app keys, which are checked with PayPal and stored encrypted.

How we built it

  • Backend: Node.js, Express and TypeScript, with Zod validation, rate limits and security headers.
  • Database and sign-in: Supabase PostgreSQL with row-level security, so each seller's data is separated at the database level, and Supabase Auth. The app connects with a restricted database login.
  • PayPal: the PayPal Sandbox, the Disputes API, OAuth token requests and webhooks with signature verification.
  • AI: the Gemini API through its OpenAI-compatible endpoint. The model returns short statements with source references. Code, not the model, decides which statements survive.
  • Frontend: React, Vite and TypeScript. One Node service serves both the API and the built site.
  • Security details: password re-checks for approvals and limit changes, AES-256-GCM encryption of sellers' PayPal secrets, and an audit log where each entry's hash includes the previous one.
  • We also used AI coding assistants throughout development.

Challenges we ran into

  • Keeping the AI honest. We solved this with structure rather than a prompt alone: the model must cite record IDs, and a separate linker drops anything unsupported.
  • Prompt injection. Buyer messages are untrusted input, so they are screened and flagged messages never reach the model.
  • Isolating sellers. We enforced separation in the database with row-level security and a least-privilege login, not only in application code.
  • Connecting many sellers to PayPal. PayPal's partner onboarding was out of reach for a hackathon, so each seller connects their own Sandbox app keys.
  • Webhooks. A PayPal webhook belongs to one app, so live events go to the owner's workspace and other sellers use Sync.
  • Free-tier limits. We handle AI rate limits with one retry and a cap on drafts per dispute.

Accomplishments that we're proud of

  • Draft responses where every statement points to a real record, and unsupported ones are removed automatically.
  • A complete safety path: approval text, password check, refund limit, and a history that can be verified.
  • Each seller's data and PayPal credentials are kept separate and encrypted.

What we learned

  • Grounding AI output in records, and checking it in code, is more reliable than asking a model to be careful.
  • Treating every external message as untrusted from the start is easier than adding it later.
  • Security rules work best when the database enforces them, not only the application.

What's next for Tiramisu

  • Partner-level "Connect with PayPal" onboarding so sellers do not paste keys.
  • Moving from the Sandbox to live mode after the required review.
  • Editing drafts before approval, and partial refund and offer flows.
  • Live webhook events for every seller, and deadline notifications.
  • More dispute types and evidence rules checked against PayPal's current seller documentation.
Share this project:

Updates

Submission history