-
-
Overview hero with live KPIs: $1,960.80 annual savings, $285.00 payouts, $3,450.00 escrow holds, and $4,820.50 wallet balance.
-
One-click persona login supporting Judge Admin, Consumer Buyer, Human Oracle, and Enterprise Agent roles plus email sign-in.
-
Workspace switcher toggling live PayPal Sandbox and offline Demo modes with voice briefing, data reset, and API key status.
-
Gemini Spending Review runs optimize_paypal_subscription in 1.07s, recovering $600/yr with Summary, JSON, and PDF audit exports.
-
Engine 1 Price Watch tracks target hardware caps (up to 43% off), shows 4x Pay Later math, and renders PayPal and Venmo buttons.
-
Engine 2 Verified Tasks scores BOUNTY-102 proof at 97/100 via Gemini and fires instant PayPal Payouts v1 batch RMWRLXRAQY72S ($45).
-
Engine 3 Milestone Escrow Gantt tracks delivery timelines (ESCROW-101 to 103, $3,450 total) with progress and date controls.
-
Engine 3 adds DHL Dispute Shield tracking on release and guards subscription downgrades ($600/yr saved) via confirmation modal.
-
Engine 4 AG Grid Ledger unifies transactions, 56 orders, 25 payouts, and invoices with category filters, CSV export, and PayPal sync.
-
Live PayPal Invoicing v2 sends milestone invoice NP-383250 ($49.00) directly from the AG Grid ledger with a Sandbox view link.
Inspiration
As autonomous AI agents begin shopping, subscribing, and contracting services on our behalf, two structural failures emerge in digital commerce:
- Immediate consumer value leakage: Households and teams lose thousands of dollars annually to forgotten "zombie" subscriptions, overpriced SaaS tiers, and retail price asymmetry across fragmented storefronts.
- The physical-world trust and ground-truth bottleneck: As software and cognitive work automate rapidly, AI agents still cannot physically verify real-world infrastructure or settle multi-party contracts safely without deterministic financial rails. This gap is highlighted in the frontier literature we studied during design:
- Google DeepMind: Virtual Agent Economies (
arXiv:2509.10147) and Distributional AGI Safety (arXiv:2512.16856) - Anthropic: Economic Index I & II (
arXiv:2503.04761,arXiv:2511.15080) - The Agentic Economy (
arXiv:2505.15799) - Some Simple Economics of AGI (
arXiv:2602.20946)
- Google DeepMind: Virtual Agent Economies (
We built NexusPulse to solve both sides on the PayPal Developer Platform. It saves users money today as an Autonomous AI CFO, and it provides a programmable clearinghouse where AI agents hire verified humans via instant PayPal Payouts and settle high-trust B2B/A2A contracts through authorized PayPal smart escrow.
What it does
NexusPulse unifies an AI Financial Agent, Human Oracles, and PayPal's payment primitives in one command center, across three interconnected engines.
1. Personal Agentic CFO and Channel3 Autonomous Deal-Hunter
- Autonomous Subscription Guard: Audits recurring PayPal Subscriptions (
v1/billing/subscriptions) for idle or overpriced plans, then executes plan downgrades or cancellations (POST /v1/billing/subscriptions/{id}/reviseand/cancel). - 100M+ SKU deal monitoring and PayPal JS SDK v6 checkout: Searches product catalogs via Channel3 (
/api/channel3/search) against buyer target-price ceilings, then completes 1-click checkout through PayPal JS SDK v6 (PayPalOneTimePaymentButton,PayLaterOneTimePaymentButton,VenmoOneTimePaymentButton). Checkout is backed by short-lived browser client tokens (GET /api/paypal/client-token) and PayPal Orders v2 (CAPTURE).
2. Proof-of-Human Oracle Bounties and Instant PayPal Payouts
- Connects autonomous AI agents that need real-world ground truth (EV charging station hardware checks, rack cooling inspections, localized linguistic audits) with human field contributors.
- Contributors submit structured field notes and optional image evidence.
- Google Gemini (
gemini-3.8-flash) evaluates each submission with a structured JSON verification score (/api/ai/verify-bounty). When a submission is verified, it immediately triggers PayPal Payouts v1 (POST /v1/payments/payouts) to the contributor's PayPal or Venmo account.
3. Zero-Dispute A2A Smart Escrow and Institutional Financial Ledger
- Conditional authorization escrow: Locks multi-milestone contracts using PayPal Orders v2 with
intent: "AUTHORIZE"(/api/paypal/escrow). A Bryntum-modeled WBS Milestone Gantt and Subscription Scheduler visualizes schedules and dependencies. Funds are captured only upon deliverable verification, and shipment tracking (/v2/checkout/orders/{id}/track) is attached to harden transactions against chargebacks. - AG Grid Enterprise ledger and cryptographic webhooks: Unifies Transactions (
/v1/reporting/transactions), Orders v2, Payouts v1, and Invoices v2 (/api/paypal/invoices) inside an AG Grid v36 financial console. It offers column pinning, search, CSV export, live PayPal Sandbox sync (/api/paypal/sync), and raw-byte cryptographic webhook verification (/v1/notifications/verify-webhook-signature).
Escrow release rule:
$$ \text{Net Escrow Release} = \mathbf{1}\bigl(\text{AI Score}(\text{proof}) \ge \tau \;\land\; \text{PayPal Webhook}(\text{sig}) = \text{valid}\bigr) \cdot (A - F) $$
where $\tau$ is the verification threshold, $A$ is the authorized escrow amount, and $F$ is the platform and processing fee.
How I built it
Frontend and full-stack runtime
Built with Next.js 16.3.6 (Turbopack), React 19.2.8, TypeScript, and Tailwind CSS v4. It features a high-contrast light fintech design system (tokens.css), 1-click evaluator persona switching (Judge / Admin, Consumer Buyer, Human Oracle, Enterprise Agent), and a grounded conversational NexusPulse AI Assistant.
PayPal server and client integration
- Server-side APIMatic-generated
@paypal/[email protected](OrdersController,PaymentsController,SubscriptionsController,TransactionSearchController) insrc/lib/paypal/paypal-client.ts, with OAuth2 token caching,PayPal-Request-Ididempotency keys, and exponential retry handling. - Client-side
@paypal/react-paypal-js/sdk-v6(web-sdk/v6/core) insrc/components/paypal/PayPalV6CheckoutWidget.tsx, paired with server-minted client tokens. @paypal/[email protected]and native PayPal Sandbox MCP (https://mcp.sandbox.paypal.com/sse) bindings for autonomous tool execution.
Credential-first dual-mode gateway
src/lib/paypal/paypal-gateway.ts works alongside a schema-identical deterministic sandbox mirror (src/lib/paypal/paypal-sandbox-mirror.ts). When PayPal Sandbox credentials are present (configured for Hackathon Slot 013 Buyer and Merchant accounts), PAYPAL_MODE=auto routes directly to https://api-m.sandbox.paypal.com. If credentials are absent or the app is evaluated offline, it falls back seamlessly to Mirror Mode without breaking checkout or state flows.
AI orchestration and RAG
- Google Gemini Interactions API (
@google/[email protected],client.interactions.create()):- Drives Autonomous CFO sweeps (
gemini-4-argon/gemini-3.8-flash) with 6 structured financial tools:create_paypal_order,dispatch_paypal_payout,optimize_paypal_subscription,search_channel3_deals,rank_human_oracle_bounties,audit_escrow_and_disputes. - Handles multimodal bounty verification (
gemini-3.8-flash) and spoken CFO audio briefings (gemini-3.8-flash-tts).
- Drives Autonomous CFO sweeps (
- Groq SDK (
[email protected]):- Powers fast conversational guidance (
openai/gpt-oss-120bwith allama-3.3-70b-versatilefallback). - Runs custom RAG over verified platform telemetry (
nexus-knowledge-base.ts). - Validates Bring-Your-Own-Key (
gsk_...) keys.
- Powers fast conversational guidance (
Persistence, deployment, and automation
Backed by Supabase PostgreSQL (@supabase/supabase-js, pg, schema.sql) and deployed to Vercel (nexus-pulse-bice.vercel.app). A Render Infrastructure-as-Code Blueprint (render.yaml) defines both the Next.js web service and an hourly autonomous CFO sweep cron worker (scripts/autonomous-sweep.mjs).
Challenges I ran into
- Building before live sandbox credentials were available: Developing from a region with restricted initial sandbox onboarding meant we could not rely exclusively on live PayPal API responses from day one. The Dual-Mode Gateway (live sandbox plus deterministic mirror) let us build and test idempotency keys, OAuth token lifecycles, and database persistence first. We then plugged in the Slot 013 live Sandbox credentials and switched over via
.env.localwithout rewriting business logic. - Bridging legacy and next-gen PayPal JS SDK v6 checkout flows: Initializing
@paypal/react-paypal-js/sdk-v6reliably alongside React 19 Error Boundaries required server-side v6 client-token generation (/api/paypal/client-token), strict prop fallback handling when public client IDs are absent, and clean separation betweenCAPTUREdeals andAUTHORIZEescrow holds. - Preventing AI hallucinations and unsafe autonomous actions: Left unconstrained, LLMs can hallucinate nonexistent features, confuse wallet balances, or trigger duplicate payment calls. We addressed this with:
- Fetch Metadata (
Sec-Fetch-Site) isolation and input sanitization PayPal-Request-Iddeduplication- Explicit human/proof verification gates before captures or payouts
- A retrieval-augmented knowledge base bound strictly to verified routes and live telemetry
- Fetch Metadata (
- Keeping high-density financial UIs fast and readable: Displaying Orders v2, Payouts v1, Invoices v2, Gantt escrow bars, and AI executive memos in a single workspace easily causes clutter or numeric overflow. Formatting utilities (
src/lib/format.ts), AG Grid column pinning and visibility controls, and strict design tokens (tokens.css) made every financial figure readable across viewports.
Accomplishments that I'm proud of
- Built an end-to-end 3-engine autonomous clearinghouse combining PayPal Orders v2 (
CAPTURE+AUTHORIZE), Payouts v1, Subscriptions v1, Invoicing v2, Shipment Trackers v2, Webhooks v1 verification, JS SDK v6, and PayPal MCP tooling in one cohesive application. - Delivered a credential-first architecture with zero-blocker Mirror parity, so judges can test live Slot 013 PayPal Sandbox flows or instant 1-click offline demo scenarios without hitting dead ends.
- Designed an anti-hallucination AI CFO and RAG Assistant with structured executive memorandums, TTS audio briefings, clickable deep-navigation links, and optional BYOK API support.
- Verified production readiness with 0 TypeScript errors (
npx tsc --noEmit), 17/17 passing integration tests (npm test), and a clean 25-route Next.js 16 production build (npm run build).
What I learned
- AI agents need cryptographic and financial rails, not just prompts. Authorization holds (
AUTHORIZE), idempotency headers (PayPal-Request-Id), signed webhooks, and proof-verification thresholds are what make agentic commerce trustworthy in production. - Typed SDKs pay compounding dividends. APIMatic's strongly typed
@paypal/[email protected]dramatically reduced integration bugs across PayPal's Orders, Payments, Subscriptions, and Transaction Search surfaces. - Resilient fallback design accelerates full-stack iteration. A deterministic local mirror alongside live cloud persistence (Supabase + PayPal Sandbox) makes both automated testing (
node --test) and multi-user judge evaluation fast and deterministic.
What's next for NexusPulse: Autonomous AI Commerce on PayPal
- Production PayPal onboarding (
api-m.paypal.com): Moving from the Slot 013 Sandbox to live PayPal Commerce Platform onboarding, with multi-merchant Payouts underwriting and dynamic webhook secret rotation. - Real-time carrier and GitHub deliverable webhooks: Expanding Smart Escrow so physical shipping events and verified repository/API milestones automatically trigger
Orders v2captures without manual polling. - Expanded Proof-of-Human Oracle network: Adding geolocation/EXIF cryptographic attestations, contributor reputation staking, and mobile-first instant PayPal/Venmo micro-bounty workflows for distributed field verification teams.
- Multi-agent A2A negotiation protocols: Letting enterprise procurement agents negotiate volume discounts over Channel3 catalogs and lock chained conditional PayPal authorizations across multiple suppliers.
Built With
- ag-grid
- ai-agents
- apimatic
- artificial-intelligence
- bryntum
- channel3
- e-commerce
- fintech
- google-gemini
- next.js
- node.js
- paypal
- paypal-js-sdk
- paypal-orders-v2
- paypal-payouts
- paypal-subscriptions
- postgresql
- react
- render
- rest-api
- tailwindcss
- tts
- typescript
- vercel
- webhooks