Inspiration

Freelancers and small merchants spend a lot of time on the boring part of getting paid: writing invoices, sending payment links, and chasing clients who forgot to pay. We wanted to see how little effort it could take. The idea: say who owes you what in one plain sentence, and let an agent handle the rest

What it does

PayAgent is an AI assistant for freelancers. You type a sentence like “Bill Ravi $20 for logo design”, and the AI turns it into a structured invoice with the client, amount, currency, and description. The app then creates a PayPal payment link using the PayPal Orders v2 API in the sandbox. When the client pays, the payment is captured and the invoice changes to Paid on the dashboard. The dashboard shows what you have billed, collected, and still owed. A “What should I do next?” button reads your invoices and gives short advice on cash flow and late payers. A “Draft reminder” button writes a polite payment reminder with the amount and the pay link.

How we built it

The backend uses Python and Flask, with SQLite to store invoices. For payments we used the PayPal Developer Platform in the sandbox: OAuth for access tokens, then the Orders v2 API to create orders and capture payments after the buyer approves. The app also has a webhook endpoint for payment completed events. Google Gemini turns free text into structured data, generates insights, and drafts reminders. The frontend is a simple dashboard page served by Flask.

Challenges we ran into

CHALLENGES WE RAN INTO

Sandbox accounts have rules that are easy to trip over. A seller cannot pay its own invoice, and two accounts in the same country could not transact in USD, so we created a separate US buyer account to complete a payment.

We also switched AI providers during the build. We started with Claude and moved to Gemini’s free tier. The first Gemini model we tried had been retired, and the next one timed out because it spent too long thinking. A faster Flash-Lite model fixed it.

Finally, AI output needed to be reliable. Models sometimes wrap JSON in extra text, so we ask for JSON only, clean it up, and show a clear message when the client or amount is missing instead of guessing.

Accomplishments that we're proud of

We are proud that PayAgent works end to end: one plain sentence becomes a PayPal payment link, and when the client pays, the invoice flips to Paid on the dashboard. We are also proud that the AI does real work, from understanding free-text requests to suggesting next steps and writing ready-to-send payment reminders. We built the whole product in under three days and solved real obstacles along the way, including sandbox account rules and swapping AI models mid-build.

What we learned

We learned how PayPal’s order lifecycle works: create the order, send the buyer to approve it, then capture the payment. We also learned that AI features are more dependable when they return structured data, and that clear status and error messages matter as much as the happy path in a payments product.

What's next for PAYAGENT

Next we want to add due dates with an automatic Overdue status, reminders whose tone matches how late the payment is, webhook signature verification, PayPal Invoicing API support, and a public deployment so clients can pay from anywhere.

Everything runs in the PayPal sandbox, so no real money moves.

Built With

Share this project:

Updates

Submission history