Inspiration
Companies are shifting from seat-based SaaS to outcome- and usage-billed AI agents—paying per resolved support ticket, per connected voice minute, or per completed coding task.
Today's payment rails treat "what the AI vendor billed" as "what the buyer owes." Without a financial clearing layer between an AI vendor's invoice and the buyer's bank account, buyers either overpay every month on unfulfilled or human-assisted agent runs, or stall AI adoption under manual spreadsheet audits.
Work Performed ≠ Work Billed≠Work Verified≠Work Payable
What it does
Floe: PayPal Clearinghouse for AI Work turns PayPal into an automated escrow and settlement clearinghouse for AI agent spend:
- Pre-Execution Budget Holds (MCP + PayPal Escrow): Before an AI agent executes paid work, it requests budget authority through Floe's Model Context Protocol (MCP) server. High-risk actions require cryptographic approval from a human controller. Floe places an authorization hold on PayPal for the approved budget.
- Outcome Verification:
At period end, Floe reconciles vendor usage claims against the buyer's own operational records using exact integer micro-dollar (
bigint) math with zero floating-point drift: $$\text{Total Billed} = \text{Verified Payable} + \text{Excluded (Voided)} + \text{Held in Dispute}$$ - Automated PayPal Split Settlement:
- Verified Outcomes: Captured and paid to the vendor immediately via PayPal.
- Unfulfilled / Excluded Runs: Released back to the buyer.
- Contested Charges: Kept on hold on the PayPal authorization while Floe packages the buyer's verification logs into a PayPal Dispute Evidence Pack.
Interactive Scenarios Included
- Customer Support AI ($4,530.24 Authorized): Settles $4,334.22 for verified autonomous resolutions, releases $141.57 for reopened tickets, and holds $54.45 where a human agent stepped in.
- Voice AI Agent ($1,900.00 Authorized): Settles $1,620.00 for connected calls, releases $185.00 for failed/unconnected calls, and holds $95.00 in disputed pass-through charges.
- Autonomous Coding Agent ($3,160.00 Authorized): Settles $2,840.00 for verified tasks, releases $210.00 for aborted runs, and holds $110.00 for duplicate runs.
How we built it
- PayPal Settlement Engine: Built in TypeScript using PayPal Orders (authorization holds), PayPal Authorizations (partial/split captures), PayPal Payouts (multi-vendor batch disbursements), PayPal Disputes (automated evidence packs), and PayPal Webhook signature verification.
- Agent Authority MCP Server: A Model Context Protocol server that enforces per-task and monthly agent spend limits, requires signed human controller approvals for restricted actions, and triggers PayPal settlement.
- AG Grid Reconciliation Workbench: An interactive dashboard built with AG Grid Community featuring pinned bottom balance-conservation rows, quick filtering, and one-click CSV export.
- Escrow Audit Timeline: Tracks each billing period from initial PayPal budget hold through verification and split capture.
Challenges we ran into
- Zero Rounding Errors Across Thousands of Micro-Transactions: Splitting thousands of sub-dollar AI tasks using floating-point math causes penny drift. We built the entire engine in integer micro-dollars (
bigint) so captured, voided, and disputed amounts always reconcile to the exact cent. - PayPal Authorization vs. Capture Timing: In live PayPal escrow flows, creating an authorization order requires buyer approval before funds can be captured. We designed the workbench so users can create live PayPal Sandbox orders while immediately previewing the split-capture and dispute breakdown.
- Preventing Runaway Agents from Bypassing Spend Caps: We moved cumulative spend tracking into the server ledger and required HMAC-SHA256 controller proofs for restricted actions so an agent cannot self-report or reset its own budget.
Accomplishments that we're proud of
- Connecting pre-execution AI agent budget governance (MCP) directly to post-execution PayPal escrow settlement in one workflow.
- Supporting outcome, per-minute, and per-task AI pricing with zero floating-point drift.
What we learned
- PayPal authorization holds + partial captures fit outcome-based AI billing naturally: Capturing verified outcomes immediately while keeping contested items held on the original authorization lets vendors get paid fast without forcing buyers to absorb invalid charges.
What's next for Floe: PayPal Clearinghouse for AI Work
- Direct one-click evidence uploads to the PayPal Disputes API when vendors contest an exclusion.
- Real-time webhook ingestion so buyers can watch their verified PayPal escrow balance update live throughout the billing cycle.
Built With
- ag-grid
- apimatic
- jev
- mcp
- node.js
- paypal
- python
- typescript
- vitest
