Inspiration
Money tasks are small but constant: writing an invoice, chasing a late client, checking what you spent last month, splitting a dinner. Each one lives in a different screen or spreadsheet. I wanted to see if one conversation with an AI agent could handle all of them, with PayPal doing the real money work underneath.
What it does
PayPal AI Money Assistant is a chat app with four skills:
- Invoicing: "Invoice [email protected] for 3 hours of design at $80/hour" creates and sends a PayPal invoice. It also finds overdue invoices and sends reminders.
- Shopping: describe what you want and your budget, and the assistant searches the catalog and creates a PayPal checkout link. Nothing is bought until you approve it on PayPal.
- Insights: ask about the last 30 days and get income, spending by category and anything unusual.
- Split bill: attach a receipt photo or type the items. The assistant reads it, assigns items to people, and sends each person a PayPal payment request for their fair share.
How I built it
- Backend: Node.js and Express.
- AI: Claude through the Anthropic API. Tool use lets the model pick the right PayPal action and ask for missing details. Vision reads receipt photos into line items.
- PayPal sandbox: Invoicing v2 (create, send, list, remind), Orders v2 (checkout) and Transaction Search (insights), authenticated with OAuth2.
- Frontend: a single-page chat UI with shortcut chips and receipt upload.
- Mock mode: with no PayPal keys, the app runs on sample data, so anyone can try every flow.
Challenges
- Keeping money math out of the model. Language models can slip on arithmetic, so the split is computed in code. Each person's share of tax and tip is proportional to their subtotal:
$$\text{share}_i = s_i + (\text{tax} + \text{tip}) \cdot \frac{s_i}{\sum_j s_j}$$
Any cent of rounding drift is added to the last person, so shares always sum exactly to the bill.
- Safe actions. The assistant confirms missing details before creating money requests, and checkout always ends with the user's approval on PayPal.
- API limits. The Transaction Search API only covers about 31 days per request, so the insights feature is built around that window.
- Judge-friendly setup. Mock mode and an offline test suite (
npm test) mean the project runs without PayPal credentials.
What I learned
How to design an agent that takes real actions with guardrails, how to combine vision with structured tool calls, and why deterministic code should own anything involving money.
What's next
Real product search instead of a fixed catalog, scheduled reminders for overdue invoices, multi-currency support, and webhooks so the assistant knows when an invoice is paid.
Built With
- ai-agents
- anthropic-api
- claude
- css
- express.js
- html
- javascript
- node.js
- paypal
- paypal-invoicing-api
- paypal-orders-api
- paypal-transaction-search-api
- tool-use