Inspiration

In the global $150 Trillion B2B commerce market, mid-market and enterprise organizations lose weeks and thousands of dollars to fragmented procurement, accounting, and payment pipelines. Frontline operators submit informal purchase requests via email and chat with uncatalogued "orphan items", accountants spend hours reconciling invoices and mapping cost centers across multiple ERPs, and trusted suppliers wait 30 to 60 days for payment settlement.

We built ProcurePay AI to turn this slow, bureaucratic friction into an autonomous, 4-second cognitive workflow that connects multi-channel ingestion, fiscal compliance, and instant, zero-touch payments powered by PayPal.

What it does

ProcurePay AI is an end-to-end autonomous B2B spend management and settlement engine:

  1. Multi-Channel Cognitive Ingestion: Ingests purchase requests from unstructured emails, plant WhatsApp messages, corporate Excel spreadsheets (FMA-017 format), and official Mexican SAT CFDI 4.0 XML electronic invoices.
  2. Virtual SharePoint Document Hub: Emulates Microsoft 365 document libraries, synchronizing files across /01_Buzon_Entrada, /02_En_Cotizacion, and /04_Aprobados_Pagados.
  3. 3-Tier Orphan Product Normalizer: Identifies informal, uncatalogued items ("orphan products") and leverages Groq LLMs (openai/gpt-oss-120b) to standardize technical descriptions, assign 8-digit SAT / UNSPSC tax codes, and estimate benchmark unit prices.
  4. Dynamic RFQ & Vendor Scoring Matrix: Aggregates and compares multi-vendor quotes based on pricing, lead times, and quality ratings with green-highlighted best bids.
  5. Cognitive Accounting Engine (NIF / SAT): Automatically assigns standard Chart of Accounts (601.01, 602.01, 602.10, 118.01, 201.01), Cost Centers (CC-ADM, CC-TAL, CC-NUE, CC-LOG), and multi-ERP cross-references (SAP Business One, Intelisis, Microsoft Dynamics 365, CONTPAQi), generating 100% mathematically balanced Debit/Credit journal entries (Pólizas) including tax withholdings (4% VAT on freight).
  6. 3-Way Matching & SAT Art. 69-B Blacklist Audit: Validates invoices against purchase orders and checks against Mexican tax authority blacklists (EFOS) with an immutable SHA-256 cryptographic seal.
  7. PayPal Sandbox Settlement Gateway:
    • Autonomous Zero-Touch (< $500 USD): Instantly triggers direct batch settlements via PayPal Payouts API v1.
    • Executive Authorization (> $500 USD): Creates a PayPal Order via PayPal Orders API v2 with a direct checkout link for executive approval.

How we built it

  • Backend Architecture: Built with Python, FastAPI, and Pydantic for asynchronous multi-agent pipeline orchestration.
  • AI Core: Integrated with Groq Cloud running openai/gpt-oss-120b for low-latency cognitive extraction, catalog normalization, and accounting reasoning.
  • PayPal Integration: Live Sandbox OAuth2 authentication, Orders API v2, and Payouts API v1.
  • Frontend & Data Grid: Interactive Command Center built with Tailwind CSS, Phosphor Icons, and AG Grid v31 for enterprise financial tables.
  • Cloud Infrastructure: Deployed on Vercel serverless runtime with isolated /tmp file systems.

Challenges we ran into

Handling heterogeneous, noisy enterprise data—from informal WhatsApp plant Spanish slang to strict Mexican SAT CFDI 4.0 XML namespaces—required engineering a robust 3-tier fallback architecture. Dynamically balancing double-entry accounting journal entries (Sum(Debits) == Sum(Credits)) while calculating Mexican tax withholdings (Art. 1-A LIVA) and multi-DMS translations also required rigorous financial validation.

Accomplishments that we're proud of

  • Delivering a fully functional, production-deployed system that executes end-to-end B2B procurement and settles PayPal Sandbox payouts in under 4 seconds.
  • Achieving mathematical perfection on balanced accounting journal entries linked to ERP data models.
  • Building a seamless, real-time multi-agent execution dashboard.

What we learned

Autonomous AI agents combined with PayPal's robust payment APIs create massive efficiency for B2B commerce, transforming complex multi-week approval cycles into auditable, zero-touch execution.

What's next for ProcurePay AI

  • Native Microsoft Graph API connectors for enterprise live SharePoint and Microsoft Teams sync.
  • Multi-currency autonomous treasury hedging using PayPal Commerce Platform.

Built With

Share this project:

Updates

Submission history