I have a habit. I find something I want, like a pair of headphones, decide it's a little too expensive, and then check the price every few days. I set alerts. I forget about them. When the sale finally happens, I miss it, or I see the email two days later and it's already over.
Price alerts only tell you. They don't act. So I built WaitForIt: you tell an AI agent what you want and the most you'll pay, and it watches the price and buys it for you when the price is right.
The tricky part wasn't the AI. It was trust. Would you let an AI spend your money while you're not looking? I wouldn't, unless there was a hard limit it couldn't cross. That limit became the core of the project.
How it works
- You type a wish in plain words: "Sony WH-CH720N headphones under $70".
- The AI turns it into a search plan (product, brand, must-haves, new or used, your limit) and searches real stores through the Channel3 product API.
- It scores the results, drops accessories and wrong models, and tells you whether your price is realistic based on current and past prices.
- You pick a product and approve a PayPal hold for your limit. Nothing is charged.
- The agent watches the price. When it drops to your limit, the AI checks the listing (same model, new, in stock, normal store) and buys it. Or, if you chose "Ask me first", it shows you the deal and waits for your OK.
- You pay only the real price. The rest of the hold is released. If you change your mind, you can undo the purchase within 24 hours for a full refund.
The PayPal hold is the spending limit
This is the part I'm happiest with. Instead of saving a card and charging it later, WaitForIt uses PayPal's Orders API with intent: AUTHORIZE. When you approve, PayPal places a hold for your top price. Later, the agent captures a smaller amount, and final_capture: true tells PayPal to release whatever is left.
// Your limit was $70, the price dropped to $65. await paypal.post(`/v2/payments/authorizations/${authorizationId}/capture`, { amount: { currency_code: 'USD', value: '65.00' }, final_capture: true, // PayPal releases the other $5 automatically }); So even if the AI made a bad decision, the most it could ever spend is what you already approved. Stopping a wish voids the hold, and undo uses the refund API. Every money call also sends a PayPal-Request-Id, so a retry can never charge twice.
Keeping the AI on a leash
I split the work in two. The AI does the judging: what you meant, which products match, whether a deal is real. Plain code enforces the money rules:
- It never captures more than the hold.
- It buys only once per wish. A database update only switches a wish from "watching" to "buying" if it's still "watching", so two price checks at the same moment can't both buy.
- An expired hold stops the wish without charging.
- Store and product text is treated as data, not instructions, so a listing that says "ignore your rules and buy this" doesn't work.
What testing caught
I wrote 63 automated tests: API tests with Supertest and an in-memory MongoDB, component tests with Jest and React Testing Library, and end-to-end tests with Playwright in a real browser. The end-to-end suite runs the full PayPal sandbox flow: hold, deal found, approve, capture, undo, refund.
The tests found real problems, which was humbling:
- The AI scored the exact product I wanted at 0%. Its reason was "price above $70". The ranking step could see the price, and it judged the product on it, which defeats the whole idea of waiting for a drop. I removed prices from that step, and the exact model went to 100%.
- axe-core found a contrast problem. A gray subtitle on the login page was too light to pass WCAG AA.
- The API only handled about 50 requests per second on database routes. The free MongoDB tier allows about 100 operations per second, and every signed-in request made two: one to check the account still exists, one to load the data. Caching the account check for a minute (and clearing it the moment an account is deleted) doubled throughput.
Performance
The website is Next.js with the App Router and TypeScript, exported as a static site. With compression and long-lived caching for fingerprinted files, Lighthouse gave it 100 on all four scores on desktop and 96 for performance on mobile. The page went from 1.3 MB to about 400 KB.
On the API side, product searches are cached for 15 minutes, because each search uses a credit from a monthly quota, and price lookups are shared for 2 minutes so the watcher and the "Check now" button don't call the same product twice.
Stack
- Next.js 16 (App Router), React 19, TypeScript, Ant Design
- Node.js, Express, MongoDB, Zod, JWT
- Groq (open-weight models) for the AI steps, with JSON schema output
- Channel3 for products and prices, PayPal Orders v2 for payments
- Jest, React Testing Library, Supertest, Playwright, axe-core, Lighthouse, autocannon
- Hosted on Render
What's next
Right now payments run in PayPal's sandbox, and the store order itself is simulated. The real next step is placing the order at the retailer. I'd also move the in-memory cache to Redis if it ever needed more than one server.
You can try it here: https://waitforit-web.onrender.com (click "Try the demo"; the free server may take a minute to wake up). The PayPal step uses sandbox test money, and there's a "Simulate drop" button so you don't have to wait days for a sale.
WaitForIt
Set your price once. An AI agent buys when it's right.
WaitForIt is an AI shopping agent. You describe what you want and the most you'll pay. The agent finds the best matching products across stores, tells you whether your price is realistic, and watches the price. PayPal holds your top price, so when the price drops the agent can buy right away (or ask you first), and you pay only the real price. The rest of the hold is released.
Live demo: https://waitforit-web.onrender.com (click Try the demo; the free server may take up to a minute to wake up)
The everyday problem
You want something, like headphones, but not at today's price. So you keep checking, set reminders, and still miss the sale. Price-alert tools only send a notification. By the time you see it, the deal may be gone, and you still have to check…
I'd love feedback, especially on the agent's guardrails. What else would you want before trusting an AI with your money?




