Inspiration
Every day, local fishermen, truffle hunters, artisan producers, and gemstone foragers sell unique, non-standardized treasures. Unlike industrial products with barcodes, each piece is unique and its fair market value depends entirely on its quality and freshness. Furthermore, perishable fresh goods (fresh fish, truffles, wild mushrooms) rapidly lose quality over time. Without dynamic pricing, sellers risk unsold waste, while buyers hesitate on freshness.
We created GradePay to bridge this gap: an AI vision agent that inspects goods against real reference standards, calculates the exact fair price, and instantly generates a ready-to-scan PayPal payment button and QR code. For fresh products, GradePay dynamically discounts the price over time and automatically regenerates the PayPal QR Code in real time, ensuring zero waste and frictionless direct sales!
What it does
Calibrated AI Vision Grading: Using Google Gemini 3.8 Flash, GradePay analyzes product photos against user-defined visual calibration standards (Grade S, A, B, C) to evaluate texture, clarity, color, and integrity.
Perishable Fresh Decay & Live PayPal Updates: When "Fresh / Perishable Product" is enabled: The app monitors optimal freshness time (12h catch, 24h day-fresh, 48h truffles). As hours tick by, GradePay applies a smooth price-decay curve down to a guaranteed seller floor price. Crucially, the PayPal checkout link and scannable PayPal QR Code dynamically re-encode in real-time to match the exact discounted price at the second of scanning!
Instant Point-of-Sale & Social Commerce: Generates interactive payment tickets, social media captions (Instagram, WhatsApp, TikTok, Facebook, X), and embeddable web widgets. Instant 1-click printing for physical retail: A4 market posters, crate/shelf QR labels, and printable 6-QR sheets for packaging.
How we built it
AI Vision Engine: Google Gemini 3.8 Flash multimodal API with custom system prompts that grade goods against calibrated visual anchors and detailed seller criteria.
Dynamic PayPal Payment Architecture: Direct integration with PayPal Checkout & PayPal.me endpoints, generating custom-amount payment payloads formatted on the fly.
Real-Time Client-Side QR Generator: High-precision vector SVG QR Matrix generation (lib/qrcode.js) that recalculates cryptographic SVG nodes in milliseconds whenever price, freshness, or quantity changes.
Time-Decay Pricing Algorithm: A smart continuous decay formula that smoothly decreases the price from the initial grade value down to the seller's guaranteed floor price based on elapsed hours, protecting margins while encouraging fast sales.
Frontend & UX: High-contrast, responsive neo-brutalist UI built with vanilla JavaScript and modern CSS, optimized for mobile merchants at sea docks, markets, or in the field.
Challenges we ran into
Sub-Second Dynamic QR Synchronization: Recalculating vector QR codes on live freshness sliders without freezing the browser thread. We solved this with lightweight vector paths and instant reactive state updates.
Accurate Grading for Non-Uniform Goods: Making AI understand subtle culinary or mineral grading cues (such as sashimi Otoro marbling vs. regular tuna, or jadeite translucency) using structured reference anchors.
Reliable Fallbacks: Implementing an offline simulation mode and resilient API handling so merchants can continue working even during remote connectivity issues.
Accomplishments that we're proud of
First-of-its-kind dynamic PayPal QR Code: A physical QR code on an étal or packaging that automatically charges the fair decayed price at the exact moment the buyer scans it.
Empowering Primary Producers: Turning any smartphone into an expert grading lab and automated PayPal cash register in under 30 seconds.
Anti-Waste Impact: Helping local fishmongers and produce harvesters sell 100% of their catch/harvest before spoilage through automated price responsiveness.
What we learned
Visual calibration is the key to trustworthy AI: Instead of relying on generic AI knowledge, anchoring vision models to 3 explicit seller-defined tiers (Grade S, A, C) dramatically improves grading precision and user confidence.
Dynamic pricing creates win-win commerce: Perishable goods lose value every hour; we learned that coupling real-time price decay with instant PayPal QR code generation fundamentally changes buyer behavior—turning hesitation into fast, confident purchases.
The power of frictionless micro-payments: Traditional checkout flows lose impulse buyers. Embedding exact pre-computed prices inside scannable PayPal QR codes eliminates friction completely for street, market, and social commerce.
What's next for GradePay — Smart Grading & PayPal
Smart Digital Shelf Tags (e-Ink): Connecting GradePay directly via webhooks to Bluetooth e-paper shelf labels so physical price tags update simultaneously with the PayPal QR code.
PayPal Smart Invoicing for Wholesale B2B: Enabling restaurants to pre-order and pay wholesale batches instantly when the morning fishing boat docks.
Built With
- dynamic-pricing
- google-ai-studio
- google-gemini
- paypal
- qr
- vision-ai