Inspiration

AI agents increasingly need answers that live inside other people's private data. Sharing raw records with every buyer leaks data; sharing nothing blocks commerce. QueryTicket asks whether a seller can ship a scoped, fixed answer - and get paid through a real payment rail - without exposing the underlying dataset.

What it does

QueryTicket is a small insight shop over 200 fictional camera-support records:

  • A buyer picks one of three fixed whole-dataset topic reports (battery, focus, delivery problems) or types a question that is mapped to a product by rules or a live AI mapper.
  • The app creates a ticket with an explicit scope and price. Nothing is delivered before payment.
  • The owner reviews and approves the offer.
  • Checkout runs through the real PayPal sandbox (Orders v2 API: create order, buyer approval on sandbox.paypal.com, server-side verify and capture). A no-credential simulation path is clearly labelled SIMULATION ONLY and uses SIM-prefixed identifiers.
  • The paid report unlocks deterministic counts over labelled synthetic records, with a downloadable JSON receipt including a SHA-256 artifact hash.
  • Record-level and personal-data requests are refused by design; the app exposes no endpoint that returns raw records, only fixed aggregate reports.
  • A recorded Groq evaluation (docs/ai-evaluation.json) classifies 16 fictional support paraphrases with an exact source quote per label, presented as checked evidence rather than assumed accuracy.

How we built it

Pure Python standard library (http.server, sqlite3, hashlib, hmac) - no frameworks, no dependencies. The PayPal adapter is sandbox-only by construction: there is no configurable production endpoint. Payments use PAYPAL_SANDBOX_CLIENT_ID/SECRET against api-m.sandbox.paypal.com with idempotency keys (PayPal-Request-Id). The hosted demo adds an owner-password gate (scrypt hash, HMAC-signed session cookie, rate-limited login). The project was specified and directed by the author with AI-assisted implementation and tests.

Verification: 20 local acceptance checks cover the purchase state machine, refusal rules, simulated payment, and artifact hashing (stdlib, no network). The real sandbox path is implemented and exercised end to end and shown in the demo video (a screenshot montage of the real hosted run: order creation, buyer approval on sandbox.paypal.com, capture verification against the PayPal API).

Challenges

Keeping the AI honest: the live AI maps questions only - reports always come from ground-truth labels, and the AI evaluation is shown as recorded evidence, not marketing. Designing a demo where one browser safely plays both owner and buyer roles without implying multi-user security.

What we learned

A payment-mediated data product can stay honest about its limits: fixed scopes, labelled simulations, and visible hashes build more trust than claims of "privacy guarantees."

What's next

Independent buyer accounts, more report types, and stronger anonymization validation before any real-data use.

Built With

Share this project:

Updates

Submission history