ProcureAI — Autonomous B2B Sourcing & PayPal Settlement Engine

Built for the PayPal AI Hackathon 2026

Live Demo: https://atstock.in/procure-ai/procureai.html

Target Categories: Best Use of Agentic Commerce, Best Use of PayPal + AI, Most Impactful, Best Use of APIMatic

  1. Inspiration & Problem Statement

In global manufacturing, logistics, and B2B commerce, sourcing industrial parts, custom packaging, or compliance materials is notoriously slow and fragmented. Procurement teams spend days exchanging emails, parsing unstructured RFQs (Requests for Quotation), calculating Delivered Duty Paid (DDP) freight/customs taxes, and manually processing invoices.

ProcureAI bridges the gap between Autonomous AI Reasoning and Instant Financial Settlement. Instead of treating AI as a passive chatbot, ProcureAI acts as an end-to-end Agentic Commerce Engine—taking a plain-English procurement request, sourcing optimal supplier quotes, structuring a legally sound Purchase Order (PO), and settling the transaction immediately via PayPal.

  1. What It Does (Core Features)

Natural Language Procurement Console:

Buyers enter plain-English sourcing requests (e.g., "500 units of double-wall corrugated boxes delivered to Chennai Logistics Hub").

Includes one-click industrial presets for rapid testing and demonstration.

Autonomous Multi-Step AI Reasoning Engine (Gemini 3 Flash):

Spec Extraction: Parses unstructured text into structured line items, quantities, material densities, and destination hubs.

Supplier Matching: Evaluates verified vendor catalogs (Apex Logistics & Mfg, Global Vinyl Co., Precision Mfg) for optimal lead times and bulk tier pricing.

Dynamic Freight & Tax Calculation: Automatically computes express air freight, insurance, and DDP customs duties/taxes.

Real-Time Purchase Order (PO) Compiler:

Generates a live, itemized commercial agreement with PO tracking numbers, Incoterms (DDP), unit pricing, and tax breakdowns.

Instant PayPal Sandbox Settlement & ERP Webhook Dispatch:

Integrates PayPal's checkout flow directly inside the compiled PO.

Upon authorization, triggers an automated digital receipt modal, logs a simulated ERP webhook dispatch to the supplier, and enables one-click receipt downloads.

Procurement Analytics & OpenAPI Developer Suite:

Analytics Dashboard: Tracks total settled volume, average procurement cycle time (4.2 mins vs. days), and bulk AI savings.

APIMatic & OpenAPI Specs: Showcases type-safe PayPal REST v2 CAPTURE order schemas transformed for autonomous agent execution.

  1. System Architecture & Tech Stack

Frontend Architecture: Single-file, responsive web application built with HTML5, Tailwind CSS, and Vanilla JavaScript (ES6+) for zero-latency deployment across any static host (GitHub Pages, Netlify, Vercel, Render).

AI Reasoning Layer: Google Gemini 3 Flash (gemini-3-flash-preview) utilizing Structured JSON Outputs (responseMimeType: "application/json") paired with a deterministic local fallback rule engine to guarantee 100% uptime during live demos.

Payment Infrastructure: PayPal Developer Sandbox API (INTENT: CAPTURE order schema) with cross-origin iframe safety guards so the checkout flow works seamlessly inside embedded previews as well as standalone domains.

API Contract Tooling: APIMatic OpenAPI schema alignment for PayPal v2 Orders API payloads.

  1. How We Built It & Challenges Overcome

Challenge 1 — Deterministic Financial Structuring from Unstructured Prompts: LLMs can occasionally hallucinate math or omit tax fields. We solved this by separating entity extraction (handled by Gemini 3 Flash) from financial calculation (handled by a strict JavaScript ledger engine that computes subtotals, freight, 8% DDP tax, and final totals accurately to two decimal places).

Challenge 2 — Cross-Origin Sandbox Restrictions: Standard payment SDKs often throw window.host security exceptions when judged inside embedded web previews or sandboxed frames. We engineered a resilient error-guard wrapper and a sandboxed checkout execution layer so judges can test the full payment lifecycle from anywhere without console errors.

  1. How to Run Locally or Deploy

Because ProcureAI is engineered as a self-contained single-file architecture (index.html), setup takes less than 60 seconds:

Clone the repository:

https://github.com/arunt1009/procure-ai

Run locally:

Simply open index.html in any modern web browser (Chrome, Edge, Safari, Firefox), or serve it with any static server (npx serve .).

Host on Custom Domain (atstock.in):

Upload index.html to a public GitHub repository, enable GitHub Pages, and point your atstock.in DNS CNAME/A records to your host.

Built With

Share this project:

Updates

Submission history