Inspiration

As small business owners know, getting paid is only half the battle. The rest is a visual and operational nightmare: chasing overdue invoices, setting up recurring plans, tracking fulfillment, and defending against payment disputes across disconnected dashboards. Most fintech platforms treat this as a manual task, while traditional AI hackathon projects merely chat about data without taking real action.

We wanted to prove that AI can handle these complex workflows. We designed PayPulse as an autonomous AI CFO and deal desk for PayPal merchants.

Our UI design was inspired by Stripe and Bloomberg dashboards, directly contrasting with the standard template aesthetic that floods modern AI hackathons. We used the "30 reasons your site looks vibecoded" audit as our blueprint to eliminate visual clutter, such as radial orbs, harsh gradients, fake terminal cards, and loose rounded corners. In their place, we built a human-designed, light institutional system using #F6F5F2 warm alabaster, #001C64 PayPal navy, sharp 3px corners, tabular monospace figures, and strict hairline layouts.


What it does

PayPulse turns passive accounting into an active, 24/7 operating loop.

  • Financial Command Center: A unified view featuring an embedded AG Studio 3.1 analytics canvas. It ingests the merchant’s book, relational customer data, and subscriptions, allowing instant preset cross-filtering for "Executive Cashflow", "Overdue & BNPL Recovery", and "Subscriptions & Disputes".
  • AI Deal Desk: The primary interface where the Deal & Billing Agent converts natural language into live mutations. Asking the agent to "Bill Alex Mercer $450 for AI pipeline delivery" automatically triggers parameters, creates a live PayPal Sandbox invoice, builds a matching Checkout Order, and generates a scannable QR code. It can also provision recurring Subscriptions and Catalog Products in seconds.
  • Autonomous Collections Nudge-Bot: This agent monitors late payments. With one click, it drafts a custom, warm negotiation note, creates a 50% milestone split invoice, and attaches a PayPal Pay Later order to secure the cash.
  • Autonomous Dispute-Shield Agent: Built to handle the "unhappy path" without human effort. If a dispute is filed, it verifies the transaction against tracking data and submits evidentiary proof to PayPal. For claims at or below $25, it issues a quick refund to bypass the $15 dispute fee.
  • Interactive 2:45 Studio Film: A cinematic, self-running walkthrough on the website itself. It uses Web Audio synthesizer effects and Edge-TTS neural voiceover to execute a live, automated demonstration of every feature, highlighting background operations as they run.

How we built it

We implemented a single-origin architecture where a FastAPI backend orchestrates all operations and serves the React 19 frontend as a single production process.

  • Frontend: React 19, Vite 6, Tailwind 4, and TypeScript 5.8.3. We integrated the AG Studio 3.1 engine, mapping relational sources, customer-to-invoice joins, and calculated expressions (such as collection_rate and outstanding_balance) directly into custom PayPal-themed visualizations. We built a fully custom Web Audio synthesis layer to handle key-clicks and click ripples.
  • Backend Orchestration: Built with FastAPI, using the deterministic-first, AI-optional routing pattern.
  • Local AI Engine: Powering the app is local Ollama (qwen3.5:2b) running on WSL at http://127.0.0.1:11434/v1. It acts as a tool-calling and argument-reconciliation model. If Ollama is offline or experiences lag, the deterministic Python router seamlessly falls back to guarantee zero-downtime execution.
  • PayPal Sandox REST API: We implemented OAuth2 client-credentials tokens with an 8.5-hour in-memory cache and automatic HTTP 401 token refresh retries. We secured POS mutations using unique PayPal-Request-Id idempotency headers. We developed integration paths for PayPal Invoicing v2, Orders v2, Billing Subscriptions v1, Shipment Tracking v1, and Disputes.
  • Fail-Closed Webhook Validation: We enforced PayPal’s verification endpoint (verify-webhook-signature) for signature checks. If PAYPAL_WEBHOOK_ID is missing or the payload is unsigned, it fails closed to prevent unauthorized ledger access.

Challenges we ran into

  • Local AI Inference Lag: A local 2B model can suffer from processing delays or parameter mismatch. We overcame this by implementing strict asynchronous wait gates and client-side timeouts. During our automated presentation, the system waits for the POST /api/agent/chat call to complete and the result card to load before showing it, pausing the tour and holding for 5.5 seconds to let the user read the outcome.
  • Evaluating Live Asynchronous Workflows: Live PayPal Sandbox webhook deliveries can have multi-minute delays, which is far too slow for a quick demo. We solved this by developing a dual-perspective Simulation Mode (/api/demo/simulate-webhook) that bypasses network signatures. This allows judges to test realistic "unhappy paths", like chargebacks and refunds, and see immediate dashboard updates.
  • Resisting Design Bloat: Refactoring a typical AI-generated UI meant scrutinizing every outline, alignment, and tag. We removed multiple hover and shadow effects, oversized rounded corners, and decorative gradients, aligning everything to a precise, data-dense ledger layout.

Accomplishments that we're proud of

  • Vulnerability-Free Codebase: Achieved Bandit: 0 findings, pip-audit: 0 vulnerabilities, and npm audit: 0 vulnerabilities across all dependencies.
  • Advanced AG Studio Use: Successfully loaded and joined 5 relational data sources to calculate custom, responsive metrics within our tailored theme.
  • The "Watch 2:45 Studio Film" Feature: Built a cinematic, fully automated showcase mode that walks through the workspace, displays actual UI interactions, and narrates background tasks using HTML5 audio and non-blocking telemetry drawers.
  • Cross-Viewport Testing: Passed all 26 Playwright E2E and visual tests, ensuring the sidebar and data-dense tables resize perfectly from 320px up to 1920px without any layout breakages.

What we learned

  • Fintech APIs Demand Safety Defaults: We discovered the value of caching OAuth tokens and implementing idempotent Request IDs to handle API mutations safely.
  • AI Agents Require Strong Guardrails: Integrating AI with transaction systems requires a deterministic-first fallback. Letting an agent call a model is only effective if your code can handle failures or timeout scenarios gracefully.
  • Choreographed Presentation is Essential: Creating a live-simulated story is much more engaging for judges than scrolling a static screen. Choreographing spotlight outlines, scrolling actions, and X-ray details can make a complex, hidden flow easy to understand.

What's next for PayPulse PayPal operations ledger

If PayPulse expands from a hackathon demo into a production financial ledger:

  1. Production Databases & OAuth: Replace our in-memory state with PostgreSQL and implement multi-tenant authentication.
  2. Scheduled Collections & Auditing: Set up automated background workers to evaluate overdue accounts, compile compliance-ready historical audit logging, and track payment metrics.
  3. Enhanced Safety Protocols: Incorporate manual human-in-the-loop approvals for larger transaction disputes or refund actions (e.g., above $100).
  4. Official Webhook Integrations: Deploy to production with active PAYPAL_WEBHOOK_ID settings to enable secure live callback capture and continuous verification.

Built With

  • ag-grid
  • ag-studio
  • agentic-commerce
  • ai-agents
  • apimatic
  • fastapi
  • fintech
  • oauth2
  • ollama
  • paypal
  • paypal-sandbox
  • python
  • react
  • render
  • tailwindcss
  • typescript
  • vite
  • webhooks
Share this project:

Updates

Submission history