Inspiration

Autonomous software agents and developers are scaling faster than ever, but granting AI unverified authority over funds creates massive risks: unchecked spending, unvetted deliverables, potential double-payments, and financial liability. Organizations need absolute cryptographic control and immutable ledgers before a single dollar moves. We built AgenticPay AI to bridge this trust gap by separating AI advisory from deterministic financial execution.

What it does

AgenticPay AI is a dual-perspective escrow workspace for organizations that commission work (outbound accounts payable) and deliver work (inbound accounts receivable). Key features include:

  • Deterministic Guardrails: Rule-based budget envelopes, per-transaction ceilings, daily caps, a strict $1,000 autonomous release limit, and an emergency kill-switch.
  • Heuristic Deliverable Audits: Automatic evaluation of milestone submissions requiring an 85% confidence score before unlocking escrow.
  • Atomic PayPal Payouts: Server-authoritative settlements backed by PostgreSQL row-locks and SHA-256 cryptographic idempotency fingerprints that mathematically prevent double-payments.
  • Enterprise AG Grid Ledger: Real-time, inspectable transaction tracking with payload visibility and risk badges.

How we built it

  • Frontend: Next.js 16 App Router, React, Tailwind CSS, and AG Grid Community for the high-density operations ledger.
  • Backend & Database: Next.js Server Route Handlers, TypeScript, and PostgreSQL enforcing atomic transactions and row-level locking.
  • Security & Guardrails: Custom policy enforcers for prompt injection sanitization (OWASP LLM01 compliance), rate limiting, and session-scoped tenant isolation.
  • Payment Integration: Server-side PayPal Payouts REST API (/v1/payments/payouts) with OAuth tokenization, failing closed safely if credentials are absent.
  • Deployment: Dockerized architecture configured via Render blueprint.

Challenges we ran into

The biggest challenge was decoupling the generative AI's conversational advice from actual financial execution. We solved this by making the AI strictly advisory—it cannot trigger payouts or write to the ledger. All financial authority is handled by strict, deterministically enforced TypeScript rules, SHA-256 idempotency checks, and PostgreSQL row-level locks.

Accomplishments that we're proud of

  • Successfully wiring a real, non-trivial PayPal Sandbox Payouts API integration that executes atomically within database transactions.
  • Achieving triple-layer idempotency (SHA-256 fingerprints, PayPal request IDs, and database unique constraints) to ensure double-payments are mathematically impossible, even during network retries.
  • Building a production-ready security posture with zero critical vulnerabilities, complete fail-closed rails, and an immutable audit trail.

What's next for AgenticPay AI

  • Implementing automated PayPal webhooks for post-payout reconciliation and refund tracking.
  • Adding role-based access control (RBAC) and multi-user departmental seats.
  • Integrating full KYB/KYC verification pipelines for high-volume enterprise compliance.

Built With

Share this project:

Updates

Submission history