Inspiration

Artificial Intelligence is rapidly evolving from answering questions to taking actions on behalf of users. AI agents can research products, compare prices, and make purchasing decisions, but giving autonomous agents access to financial transactions introduces serious risks.

What happens if an AI agent exceeds its budget, selects an untrusted vendor, purchases the wrong product, or executes an unauthorized transaction?

We wanted to address this gap by building TRUSTPAY AI, a secure financial control layer that allows AI agents to assist with procurement while keeping humans in control of spending decisions.

Our vision is simple: Let AI buy. Never let AI overspend.

What it does

TRUSTPAY AI is an AI-powered procurement and financial security platform designed for individuals and organizations.

Users can describe their purchasing requirements in natural language, such as finding a laptop within a specific budget or discovering datasets for research.

The platform is designed to:

  • AI Product Discovery: Help users discover and compare products and digital datasets based on their requirements.
  • Intelligent Procurement: Convert natural-language requests into structured purchase proposals.
  • Policy Guardrails: Enforce spending limits, approved vendors, restricted categories, and organizational procurement policies.
  • Risk Analysis: Identify suspicious requests, unusual spending patterns, and potential policy violations.
  • Cryptographic Spending Mandates: Use transaction-bound HMAC-SHA256 signatures, expiration, and nonce validation to protect purchase authorization.
  • Secure PayPal Payments: Support a buyer-approved PayPal Sandbox checkout workflow.
  • Audit Ledger: Maintain hash-linked records of procurement decisions, approvals, and payment-related events.
  • Purchase Management: Provide purchase history and transaction visibility.

For organizations, TRUSTPAY AI also introduces role-based procurement workflows involving employees, approvers, administrators, and security teams.

How we built it

We designed TRUSTPAY AI around a modular architecture that separates AI decision-making from financial authorization.

Frontend: React, Vite, and Tailwind CSS are used to build a responsive enterprise-style procurement dashboard with an AI assistant, purchase history, settings, and administrative workspaces.

Backend: Python and FastAPI handle procurement requests, authentication, policy validation, transaction processing, and API communication.

AI Integration: Google Gemini API is used to interpret natural-language procurement requests and help generate structured purchase proposals.

Security Engine: Pydantic-based validation and deterministic policy checks enforce purchase restrictions. HMAC-SHA256 is used to create transaction-bound spending mandates with expiry and replay protection.

Payment Integration: PayPal Sandbox Orders API provides the payment workflow, including buyer approval and server-side payment verification.

Database and Audit: SQLite is used for initial data persistence, with a planned PostgreSQL migration for production-grade deployment. The audit architecture uses SHA-256 hash chaining to help detect unauthorized changes to recorded events.

Our central architectural principle is that the AI agent can propose a purchase, but it cannot independently authorize or execute an unrestricted payment. Financial decisions must pass through the policy and authorization layers.

Challenges we ran into

Building a secure autonomous procurement system introduced several technical challenges:

  • Balancing autonomy and control: We needed to let AI assist with purchasing without giving it unrestricted financial authority.
  • Transaction security: Designing transaction-specific mandates with expiration, nonce validation, and single-use authorization required careful backend validation.
  • Payment workflow complexity: Integrating PayPal required understanding the separation between order creation, buyer approval, payment capture, and webhook verification.
  • Policy enforcement: We had to ensure that deterministic backend rules—not AI-generated recommendations—remain the final authority for purchase restrictions.
  • Deployment and data consistency: Connecting the frontend and backend across separate deployment environments introduced API configuration, CORS, and database persistence challenges.
  • Audit integrity: Designing a verifiable, hash-linked transaction journal required careful handling of event ordering and cryptographic verification.

These challenges helped us understand that building an autonomous financial application requires much more than integrating an AI model with a payment API.

Accomplishments that we're proud of

We are proud of designing a procurement architecture in which AI assistance and financial authorization are separate responsibilities.

Some of our key accomplishments include:

  • Building an AI-powered procurement assistant for natural-language purchase requests.
  • Designing a deterministic policy guardrail engine.
  • Developing a transaction-bound cryptographic spending mandate concept.
  • Integrating a PayPal Sandbox payment workflow.
  • Designing an append-only, SHA-256 hash-linked audit ledger.
  • Creating a multi-role procurement experience for individuals and organizations.
  • Bringing product procurement and digital dataset procurement into one platform concept.

Most importantly, we focused on solving a real problem that will become increasingly important as AI agents gain the ability to perform financial actions.

What we learned

Throughout this project, we learned that trust is one of the most important requirements for agentic AI systems.

We gained practical experience with AI integration, backend API development, payment workflows, cryptographic signing, policy enforcement, authentication, and deployment.

We also learned that an AI-generated recommendation should never be treated as proof of authorization. Every sensitive financial action needs independent validation, clear user consent, and a traceable record.

What's next for TrustPay AI

We want to evolve TRUSTPAY AI into a production-ready financial control layer for autonomous AI agents.

Our next steps include:

  1. Live Product Integrations: Connect real supplier catalogs and product discovery APIs for accurate product availability, pricing, and comparisons.
  2. Digital Dataset Marketplace: Integrate dataset providers with verified payment-based entitlements and secure file downloads.
  3. Advanced Organizational Controls: Introduce multi-level approvals, department budgets, spending limits, and organization-wide procurement policies.
  4. Stronger Authentication: Add multi-factor authentication and more advanced identity and access management.
  5. Production Infrastructure: Migrate to persistent PostgreSQL storage and strengthen monitoring, backups, and deployment reliability.
  6. Expanded Payment Support: Explore additional payment methods and eligible connected-account capabilities.
  7. Advanced Threat Detection: Improve risk scoring and detect unusual agent behavior, suspicious vendors, and potential procurement fraud.

Our long-term goal is to make TRUSTPAY AI a trusted financial security layer between autonomous AI agents, businesses, and the real world.

TRUSTPAY AI — Let AI procure. Trust every transaction. Control every rupee.

Share this project:

Updates

Submission history