MerchOps AI — Smarter Financial Operations for Small Businesses
Inspiration
Small businesses often face a cash-flow problem that isn't necessarily caused by a lack of revenue. Their customers may pay invoices late, while supplier payments, salaries, and other expenses still need to be paid on time.
We wanted to explore a simple question:
What if a small business could use AI to make better financial decisions without giving AI unrestricted control over its money?
That question inspired us to build MerchOps AI, an AI-powered financial operations cockpit designed to help merchants understand their cash position, manage collections, and make safer payout decisions.
What it does
MerchOps AI brings several important financial operations into one dashboard:
- Cash Flow Forecasting: Projects future cash positions, identifies potential shortfalls, and highlights when the business may fall below its safety reserve.
- AI Recovery Plans: Helps merchants identify possible actions to improve their cash position.
- Invoice Collections: Identifies overdue invoices and helps prepare payment reminders for merchant review.
- Payout Management: Evaluates supplier payouts against available internal cash and the merchant's minimum safety reserve.
- Audit Trail: Records important actions and decisions so merchants can review what happened.
- Safety Test Bench: Demonstrates how the system handles risky operations and blocks actions that violate financial rules.
Our central principle is:
AI proposes. Rules decide. Humans authorize.
AI can analyze information and recommend actions, but it cannot independently override financial safeguards or authorize payments.
How we built it
We approached MerchOps AI as a working product rather than a collection of isolated API experiments.
We built a financial operations dashboard with separate workflows for forecasting, AI plans, invoices, bills, audit logs, and safety testing.
The application combines AI-assisted recommendations with deterministic financial calculations and rule-based authorization.
One important part of the implementation was the payout protection mechanism. Before a payout can proceed, the system evaluates the projected remaining cash against the merchant's safety reserve. If the transaction would breach that reserve, the application blocks it.
We also integrated PayPal Sandbox to demonstrate payout execution without moving real money. The integration allowed us to explore the payment lifecycle, payout status handling, and settlement verification.
We added automated tests for important scenarios, including reserve-breach prevention, duplicate payout attempts, and payout settlement handling.
Challenges we faced
Building a financial operations product with payment integration came with several challenges.
1. Balancing AI with financial safety
We initially had to think carefully about how much control an AI system should have. We decided that AI should assist with analysis and recommendations, while deterministic rules should enforce financial constraints. This separation became the foundation of the project.
2. PayPal Sandbox integration
Working with PayPal's APIs involved understanding authentication, permissions, payout requests, and settlement statuses. We also encountered limitations with accessing certain account-balance information because the required reporting permission was unavailable to our application. Instead of presenting an unverified wallet balance, we made the application clearly communicate when that information was unavailable.
3. Handling asynchronous payment operations
A payout request does not always mean that a payout has completed. We had to account for pending and successful states, settlement polling, duplicate requests, and avoiding duplicate internal ledger updates.
4. Making financial calculations reliable
We learned that financial calculations need to be predictable. We used integer-cent arithmetic for monetary calculations rather than relying on floating-point values, helping avoid precision errors.
5. Building and testing under a hackathon deadline
With limited time and a small team, we had to prioritize the core product experience, integrate the payment flow, test important safety scenarios, and deploy a working demo.
What we learned
This project taught us that building an AI-powered financial product is about much more than connecting an AI model to an API.
We learned:
- How to integrate PayPal Sandbox into a practical application.
- Why asynchronous payment processing and idempotency matter.
- How deterministic business rules can make AI-assisted systems safer.
- Why financial calculations require precision and careful validation.
- How to design workflows that keep humans involved in important financial decisions.
- How to test, debug, deploy, and demonstrate a full-stack application under time constraints.
Most importantly, we learned that trust is a core feature of financial AI. A system should not only recommend what to do; it should also explain its decisions, enforce boundaries, and make important actions reviewable.
Accomplishments We're Proud Of
Built a complete financial operations product: We brought cash-flow forecasting, AI-assisted recovery plans, invoice collections, supplier payouts, and audit tracking together in one dashboard.
Implemented financial safety controls: Our reserve-protection mechanism prevents payouts that would push a merchant's projected cash below their defined safety reserve.
Integrated PayPal Sandbox: We successfully executed and verified a $3,000 Sandbox payout, including the transaction fee, and demonstrated how PayPal can fit into a merchant's financial workflow.
Handled real payment lifecycle challenges: We implemented payout status polling, settlement handling, and safeguards against duplicate processing.
Made AI accountable: Instead of allowing AI to independently move money, we designed a system where AI recommends actions, deterministic rules enforce financial boundaries, and humans authorize important transactions.
Tested the product thoroughly: We achieved 85 passing automated tests, covering important business logic, payout handling, and safety scenarios.
Deployed a working application: We took the project beyond a prototype running locally and deployed it as an accessible web application.
Our biggest accomplishment is that we didn't just build another AI chatbot for finance. We built a working demonstration of how AI-assisted financial operations can combine automation, deterministic safeguards, and human control.
What's next?
We see MerchOps AI as a starting point for a more complete financial operations platform for small businesses.
Future improvements could include persistent database storage, merchant authentication, verified live account-balance synchronization, production payment integrations, and more advanced forecasting using real business transaction data.
Final thoughts
We built MerchOps AI around one belief: small businesses deserve the benefits of AI without having to surrender control of their finances.
AI should make financial operations smarter, not less accountable.
MerchOps AI — AI proposes. Rules decide. Humans authorize.
Built With
- automated
- generative-ai
- mcp-typescript-sdk
- next.js-15
- node.js
- openrouter
- paypal-rest-api
- paypal-sandbox
- react-19
- render
- rest-api
- tailwind-css
- typescript
- zod