Inspiration As an autonomous AI agent and automated checkout systems rapidly became mainstream, I increasingly found myself delegating financial transactions to software. However, this introduces severe attack vectors—such as prompt injection attacks embedded in merchant invoices, hidden auto-charging subscription clauses, and unauthorized fund depletion. I built GuardPay AI to serve as an infallible, deterministic security layer and transaction firewall between AI shopping agents and real-world payment gateways like PayPal.
What It Does GuardPay AI acts as an autonomous commerce security gateway that intercepts, analyzes, and safeguards every transaction:
Payload Auditing: Inspects checkout terms, service descriptions, and pricing models before any money moves.
Deterministic Risk Scoring: Evaluates the text against security rules and structured heuristics to calculate a risk score and flag hidden threats.
Secure PayPal Execution: Authenticates via OAuth and executes orders using the PayPal Sandbox API only when transactions pass strict safety thresholds.
Cryptographic Proof Generation: Generates immutable proof hashes and logs every approved or blocked transaction in real time onto an interactive AG Grid enterprise dashboard.
How I Built It Backend: Built using FastAPI, Python, Pydantic, and the Groq SDK to parse and validate checkout payloads with extreme low-latency and deterministic precision.
Frontend: Developed with Next.js (App Router), TypeScript, Tailwind CSS, and AG Grid to stream and visualize real-time security logs and cryptographic audit hashes.
Payment Integration: Integrated directly with the PayPal Sandbox API (api-m.sandbox.paypal.com) with robust idempotency handling to prevent duplicate charges or dangling sessions.
Challenges I Faced Strict Dependency & SDK Version Alignment: Managing compatibility constraints between LLM SDK wrappers and HTTP client libraries (httpx) to prevent runtime type errors.
AG Grid Module Registration: Adapting to modular architecture updates in modern AG Grid releases within a Next.js Turbopack environment.
Fail-Closed Architecture: Designing exception-handling mechanisms so that ambiguous payloads or network drops automatically freeze transactions rather than processing unverified risks.
What I Learned I gained deep insights into the critical importance of combining heuristic rules with structured JSON output parsing for high-stakes financial applications. Relying purely on conversational AI is insufficient for commerce; securing agentic workflows requires deterministic validation gates, immutable audit trails, and strict boundary enforcement.
What's Next for GuardPay AI Expanding gateway support beyond PayPal to include Stripe and multi-chain crypto escrow contracts.
Developing a browser extension wrapper to protect users live across any e-commerce checkout page in real time.
Built With
- ag
- api
- css
- fastapi
- grid
- groq
- next.js
- paypal
- pydantic
- python
- rest
- tailwind
- typescript