Inspiration
Freelancers regularly receive underspecified client requests, then spend time translating them into clear deliverables, milestones, pricing, and payment requests. PayFlow AI connects that reasoning layer directly to a safe PayPal Sandbox workflow while keeping the freelancer in control of every financial action.
What it does
PayFlow AI accepts a client brief and target budget, uses a local AI model to generate a structured scope, risks, deliverables, and milestone payment plan, and requires explicit human approval before any PayPal order can be created.
Once approved, a freelancer can create a PayPal Sandbox order for a milestone. PayPal hosts buyer approval, PayFlow captures the approved payment, and verified PayPal webhooks update the project timeline and payment state.
The AI is not a decorative chatbot: its structured output directly shapes the milestone/payment workflow presented to the freelancer.
How we built it
We built PayFlow AI with Node.js and Express, a responsive browser-native frontend, a dedicated local Qwen2.5 0.5B Instruct model served through llama.cpp, and the PayPal Developer Platform.
The PayPal integration uses:
- Sandbox OAuth authentication
- Orders v2
- PayPal-hosted buyer approval
- Capture
- Webhooks
- Webhook signature verification
The AI pipeline converts unstructured briefs into project semantics and milestone weights. Before those recommendations can reach the payment layer, PayFlow validates the structure, rejects generic milestone names, and normalizes milestone amounts so they add up exactly to the user-approved budget.
Local inference has a timeout and a deterministic fallback so the demo remains reliable without pretending a model response succeeded. PayPal credentials stay server-side and all financial actions are Sandbox-only.
Challenges we ran into
Local AI inference can vary in latency and output quality, especially on a small VPS. We solved this by running a dedicated lightweight local model and adding a strict validation/normalization layer around its output.
We also deliberately separated AI recommendation from payment execution. A human approval gate is required before order creation, and incoming webhook events are signature-verified before they can mutate project state.
Accomplishments that we're proud of
- AI output directly drives the payment plan instead of sitting beside checkout as a chatbot.
- Human approval is required before any PayPal order can be created.
- End-to-end PayPal Sandbox OAuth, Orders, capture and webhook architecture.
- Verified PayPal webhooks and server-side secret handling.
- Financial normalization guarantees milestone totals match the approved budget.
- Responsive public demo and open-source repository.
What we learned
Connecting AI to payments is less about maximum autonomy and more about clear boundaries. The strongest workflow lets AI structure ambiguous work while keeping consequential payment actions explicit, reviewable, and verifiable.
What's next for PayFlow AI
Next we would add persistent database storage, reusable client templates, invoice generation, richer change-request analysis, multi-currency planning, team approvals, and a production PayPal onboarding path for freelancers and small studios.
Built With
- ai
- css3
- express.js
- fintech
- html5
- javascript
- llama.cpp
- machine-learning
- node.js
- paypal
- qwen2.5
- rest-api
- webhooks
Log in or sign up for Devpost to join the conversation.