Inspiration
I wanted the reward for a good habit to arrive when it was earned, rather than depend on remembering to buy it later. RewardLoop turns that promise into a clear goal and a purchase the user approves in advance, for themselves or someone they love.
What it does
Choose a real product from a real store, set a habit and say what counts as progress. Check in with text, a photo or a voice note. RewardLoop AI checks that evidence against the goal, explains what is missing, and counts an accepted day toward the reward. A calendar and habit journal make progress easy to revisit.
Before the agent can shop, the user saves delivery details privately, connects PayPal in PayPal's own window, and approves one exact item and variant, one merchant, quantity one, a delivery destination, an all-in spending cap and an expiry date. Saving an address alone never grants permission to buy. The user can revoke permission.
Once the goal is earned, the pre-approved shopping run starts automatically. Kernel opens the user's isolated retailer browser, adds the item, fills eligible delivery fields from saved details and reads checkout. Application code checks the item, variant, merchant, quantity, destination, currency, shipping, tax, total, spending cap and approval window before a payment can proceed. Login, CAPTCHA or an unsupported checkout hands control back to the user.
This hackathon build uses PayPal Sandbox for test payments. The retailer order remains a dry run: no real charge, store order or shipment is made.
How we built it
The app uses Next.js, React, TypeScript and PostgreSQL. Channel3 identifies real products, variants and merchant offers. RewardLoop AI reviews multimodal check-ins, writes journal entries and plans browser steps. Kernel provides isolated browser profiles and Live View.
The AI identifies delivery fields; restricted application code supplies the saved values. Password and card fields are excluded. Delivery details and the PayPal wallet token are encrypted at rest, and the app shows masked labels. PayPal handles buyer authentication and wallet approval.
When checkout satisfies the approved terms, the server creates an Orders v2 Sandbox payment for that exact total. Each run has a stable request ID and a database-enforced payment reservation. Only a matching completed capture counts as paid. An uncertain response is reconciled against the same order instead of creating another payment.
Challenges we ran into
Balancing privacy with functionality was the hardest architectural challenge. The shopping agent needs enough context to identify a product and navigate checkout, while personal details, retailer sessions and payment authority need carefully limited access.
I addressed this by separating AI reasoning, protected data and transaction execution. Browser sessions are isolated per user. The AI maps delivery fields, while scoped application code fills the saved contact details. PayPal authentication stays in PayPal's window. Purchase authority is enforced on the server through exact, revocable terms rather than entrusted to a model prompt. Designing these boundaries made the agent useful while keeping the user's control explicit.
Real retailer checkout also exposed cases that local tests missed: slow affiliate redirects, required phone numbers, changing page layouts and a checkout with no separate tax line. I tested these against live pages and made the flow stop when it could not establish a safe next step. Missing tax is treated as zero only when the displayed total equals subtotal plus shipping exactly.
Accomplishments that we're proud of
After one-time setup, a recorded voice check-in earned the goal and triggered an unattended shopping run. The agent reached the MiiR mug checkout, validated a $29.95 total against a $35 cap, and obtained a verified completed PayPal Sandbox capture. The retailer order was not placed.
I am also proud that the purchase limits are enforced by application code and database constraints, and that the habit journal gives the user something useful every day before the reward arrives.
What we learned
A useful shopping agent needs clear boundaries around both data and authority. Separating what the model can suggest from what the application may execute, and treating an unknown payment result as a distinct state, were essential to making the flow dependable.
What's next for RewardLoop
Support more retailers, improve recovery from checkout changes, and work with merchant partners on live payment and order completion. Continue refining the daily habit journal and gift-reward experience.
Built With
- channel3
- google-gemini
- kernel
- next.js
- paypal
- paypal-orders-api
- paypal-sandbox
- paypal-vault
- playwright
- postgresql
- react
- render
- typescript