Inspiration
Global freelance and B2B software procurement exceeds $1.5 trillion annually, yet buyers and independent vendors still suffer from three painful bottlenecks:
- Scope & Pricing Deadlocks**: Endless back-and-forth emails arguing over milestone splits and hourly estimates.
- Blind Payout Risk: Buyers fear releasing funds before verifying that code deliverables actually pass tests and security checks, while vendors fear unpaid invoices after delivering work.
- Fragmented Reconciliation: Finance teams manually match chat agreements, GitHub commits, PayPal order IDs, and settlement receipts across disconnected spreadsheets.
DealPact AI bridges the gap between agreement, proof of work, and programmatic money movement by putting a 3-agent negotiation and QA verification engine directly in front of the PayPal Developer Platform and an institutional-grade AG Grid reconciliation ledger.
What It Does
DealPact AI is an end-to-end Agentic Commerce Workbench that takes a B2B software engagement from initial scope to verified PayPal settlement:
- Multi-Agent Contract Negotiation Arena: A Buyer Procurement Agent (optimizing budget and SLA protections) and a Vendor Architect Agent (defending engineering effort and milestone breakdown) negotiate a structured 3-milestone Smart Pact (e.g., M1 40% / $1,800, M2 35% / $1,575, M3 25% / $1,125).
- Live PayPal Sandbox Order & Invoice Creation: Once a pact is reached, DealPact AI invokes structured PayPal agent tools (
paypal_create_order,paypal_create_draft_invoice) againsthttps://api-m.sandbox.paypal.com(POST /v2/checkout/orderswithPayPal-Request-Ididempotency keys andPOST /v2/invoicing/invoices), returning real Sandbox Order IDs,paypal-debug-idheaders, and buyer approval HATEOAS links. - QA Escrow Auditor Gatekeeper: Before any milestone payout can be captured, the QA Escrow Auditor Agent inspects the submitted code deliverable for functional exports, input validation, executable tests, and security vulnerabilities (SQL injection,
eval, ReDoS):- Passing Deliverables (e.g., 100/100): Unlock settlement via PayPal Order Capture (
POST /v2/checkout/orders/{id}/capture) and our Instant Sandbox Settlement Bridge. - Vulnerable or Incomplete Deliverables: Automatically BLOCK payout release, hold the funds in escrow, and generate a line-by-line remediation diff.
- Passing Deliverables (e.g., 100/100): Unlock settlement via PayPal Order Capture (
- AG Grid Financial Reconciliation Ledger: Every milestone, PayPal Order ID,
paypal-debug-id, invoked@paypal/agent-toolkittool, escrow status badge, and AI QA score is tracked in a customized dark-mode AG Grid terminal with sortable headers, status filters, pinned summary totals, CSV/JSON audit export, and printable cryptographic Escrow Audit Certificates. - Live PayPal Sandbox API Telemetry Inspector: A slide-out developer drawer records every real outbound request and inbound response from
api-m.sandbox.paypal.com, giving judges 100% transparency into HTTP status codes (201 Created), latency, and debug IDs.
How We Built It (Tools & AI Statement)
In accordance with the Official Rules, here is the complete list of PayPal technologies, AI models/tools, and sponsor platforms used to build DealPact AI:
- PayPal Developer Platform (Sandbox REST APIs & Agent Toolkit):
- Integrated PayPal OAuth 2.0 (
POST /v1/oauth2/token), PayPal Orders v2 API (POST /v2/checkout/orders,GET /v2/checkout/orders/{id},POST /v2/checkout/orders/{id}/capture), and PayPal Invoicing v2 API (POST /v2/invoicing/invoices) againsthttps://api-m.sandbox.paypal.com. - Built structured agent function-calling schemas modeled on
@paypal/agent-toolkit(paypal_create_order,paypal_get_order,paypal_capture_order,paypal_create_draft_invoice) so AI agents initiate and verify money movement autonomously with strict QA guardrails.
- Integrated PayPal OAuth 2.0 (
- AI Models & Coding Agents:
- OpenAI Codex (GPT-6 Astra) & OpenAI API: Used during development for full-stack architecture synthesis, automated test generation (26 end-to-end smoke tests), and multi-agent negotiation/QA orchestration, paired with a deterministic static AST/heuristic analyzer fallback so the live demo runs reliably with zero API key friction for judges.
- Sponsor Tools Integrated:
- AG Grid (
ag-grid-community): Powers the central PayPal Escrow & Reconciliation Ledger with custom dark fintech theming, custom status badge cell renderers, inline QA progress bars, sortable columns (DELIVERABLE SCOPE,AGENT TOOL,PAYPAL DEBUG ID), quick filters, pinned summary totals, and CSV export. - APIMatic Context Plugin for PayPal: Used during AI-assisted development to validate PayPal Orders v2 and Invoicing v2 request schemas, idempotency headers (
PayPal-Request-Id), and HATEOAS link parsing. - Render: Used to deploy and host the live production web service (
https://dealpact-ai.onrender.com) with managed Sandbox environment variables and health checks.
- AG Grid (
Challenges We Ran Into
In live PayPal Sandbox Orders v2 workflows, a newly created order starts in CREATED (PAYER_ACTION_REQUIRED) until a buyer manually logs into the Sandbox popup UI. Because busy hackathon judges need to evaluate both real Sandbox order creation and end-to-end settlement reconciliation in seconds, we engineered a dual-path solution: judges can either click "Approve in Sandbox ↗" to log in with a PayPal Sandbox buyer account, or click **Judge Auto-Pilot (1-Click), which creates a real order on api-m.sandbox.paypal.com, verifies it via a live GET /v2/checkout/orders/{id} call (logging the real paypal-debug-id), and executes an Instant Sandbox Settlement Bridge to demonstrate the complete reconciliation lifecycle in AG Grid.
What's Next for DealPact AI
- PayPal Webhooks & Dispute Automation: Automatically ingest
CHECKOUT.ORDER.APPROVEDandCUSTOMER.DISPUTE.CREATEDwebhooks to attach the QA Escrow Auditor's static analysis report directly as dispute evidence. - Multi-Party Payout Splits: Integrate PayPal Payouts API to automatically split released milestone funds across lead contractors, subcontractors, and QA reviewers.
Built With
- ag-grid
- apimatic
- codex
- express.js
- node.js
- openai
- paypal
- paypal-agent-toolkit
- paypal-invoicing-api
- paypal-orders-api
- paypal-sandbox
- render