Inspiration
Freelancers and small businesses often lose valuable time chasing overdue invoices. Existing collections tools can feel aggressive and impersonal, which risks damaging long-term client relationships. We built PayPilot to help businesses recover revenue while communicating with empathy.
What it does
PayPilot is an AI-powered accounts-receivable copilot. A user provides an invoice amount, age, payment history, client relationship, and relevant context. PayPilot then:
- Evaluates the invoice’s recovery risk
- Explains the recommended approach
- Chooses an appropriate communication tone
- Drafts a personalized payment reminder
- Proposes a full or flexible payment schedule
- Creates a secure PayPal Sandbox checkout
- Captures the order after buyer approval
Every recommendation remains editable and under human control.
How we built it
PayPilot uses a responsive HTML, CSS, and JavaScript interface with a server-side JavaScript API. Its explainable AI recovery engine considers invoice age, amount, payment history, and relationship context to produce a risk score and recovery strategy.
PayPal is central to the payment workflow. The server securely exchanges Sandbox credentials through OAuth 2.0, creates an Orders v2 checkout, redirects the customer to PayPal for approval, and captures the approved order server-side. Credentials never reach the browser or public repository.
The application is deployed as a Cloudflare Worker through ChatGPT Sites.
Challenges we faced
The most important challenge was building a complete payment lifecycle without exposing credentials. We separated all PayPal authentication and order operations from the browser and stored credentials as protected deployment secrets.
We also designed a reliable local AI workflow so the demo remains functional without depending on an external model being available. Another challenge was balancing payment urgency with respectful, relationship-aware communication.
Accomplishments that we're proud of
- Completed a working PayPal Sandbox order and approval flow
- Added server-side order capture
- Built explainable, editable AI recommendations
- Created adaptive payment plans based on invoice risk
- Delivered a responsive experience for desktop and mobile
- Kept all payment credentials out of client-side code
What we learned
We learned how PayPal OAuth, Orders v2, buyer approval, and order capture work together. We also learned that financial AI should support human judgment rather than automate sensitive communication without oversight.
What's next for PayPilot
Next, we plan to add invoice-platform integrations, scheduled follow-ups, payment webhooks, multilingual outreach, team approval workflows, and analytics that help businesses understand collection patterns without profiling customers unfairly.
Built With
- 2.0
- ai
- api
- chatgpt
- cloudflare
- css3
- html5
- javascript
- node.js
- oauth
- orders
- paypal
- rest
- sandbox
- workers