-
-
Policy engine interface showing active invariants and an AI override prevention sandbox test.
-
Payment workspace overview tracking active holds, multi-stage workflows, and recent ledger activity.
-
Adversarial injection shield detecting and vetoing an untrusted system override payload
-
Deterministic policy guard listing programmatic money invariants and rule enforcement gates.
-
PayPal sandbox modal verifying a connected OAuth handshake status and setup guide.
-
Stage 2 inspection popup outlining buyer checkout authentication and hold terms.
-
Payment order form for creating simulated pipelines with custom ceiling limits.
-
Workspace details panel breaking down security assessments and connected provider references.
-
Stage 4 capture logs showing endpoint URIs and digital signature verification data.
-
Auditor test screen prompting for an untrusted payload submission to check shields.
-
• Transaction Inspector panel displaying specific details, pending statuses, and verification results for transaction TXN-E4AEB4E7.
-
• Provider Reconciliation Center ledger showing sync statuses, auth IDs, and hold balances across multiple payment contracts.
Holdfast Protocol
Trust Infrastructure for AI-Powered Commerce
Inspiration
AI agents are becoming capable of researching products, making decisions, and coordinating complex workflows. As these agents become more autonomous, a critical question emerges: How do we let AI participate in financial workflows without giving it unchecked authority over payments?
An AI agent can misunderstand a request, recommend an excessive amount, or be manipulated by malicious instructions. In a payment workflow, these mistakes can have real financial consequences.
We built Holdfast Protocol around a simple principle: AI can propose a payment, but it should never be the sole authority that permits one.
Our goal is to make AI-powered commerce safer by placing deterministic policies, explicit approval steps, and verifiable evidence between an AI-generated recommendation and a payment action.
What It Does
Holdfast Protocol is a payment-safety layer for AI-powered commerce. It combines AI-assisted decision-making with deterministic authorization policies and a payment workflow built around PayPal.
The system is designed to:
- Evaluate payment proposals: Check proposed payments against configured policies and spending limits.
- Enforce deterministic safeguards: Reject proposals that violate payment rules, regardless of how confidently the AI recommends them.
- Identify suspicious requests: Demonstrate how adversarial or prompt-injection-style instructions can be blocked by the safety layer.
- Support explicit approval: Separate policy evaluation from the approval required to proceed with a payment.
- Integrate with PayPal: Use PayPal Orders and authorization/capture workflows to connect payment decisions with payment execution.
- Maintain an auditable workflow: Record decisions and relevant evidence so the reasoning behind a permitted or rejected action can be inspected.
The central idea is simple: intelligence may help make a decision, but financial authority must remain constrained by enforceable rules.
How We Built It
Holdfast Protocol uses a web application, a backend policy engine, and an MCP server to organize its payment-safety workflow.
Frontend: React and Vite provide the interface for reviewing payment proposals, inspecting decisions, and following the workflow.
Backend: Node.js and Express coordinate the application logic and enforce the payment-safety rules.
Policy enforcement: Deterministic checks evaluate payment proposals against configured limits and conditions. The AI-assisted layer does not independently authorize payments.
PayPal integration: PayPal Orders API and the authorization/capture workflow provide the payment integration. Sandbox buyer approval is part of the authorization flow where required.
Model Context Protocol (MCP): The MCP server exposes structured capabilities for AI-assisted interactions with the system.
Testing: Automated tests cover policy decisions, validation, and adversarial scenarios.
The workflow follows a clear sequence:
- Create a payment proposal.
- Evaluate it against the configured policies.
- Approve or reject it according to the required controls.
- Verify the relevant conditions and evidence.
- Proceed to payment authorization or capture only when the applicable requirements are satisfied.
The application also includes simulated scenarios to demonstrate policy violations and rejection behavior without executing real payments. These simulations are distinguished from actual PayPal Sandbox operations.
Challenges We Faced
One of our biggest challenges was defining a meaningful boundary between AI reasoning and financial authority.
An AI model can produce useful recommendations, but its output should not override a spending limit or bypass a required approval. We therefore focused on making policy enforcement deterministic and keeping the decision to permit a payment separate from the AI's recommendation.
We also had to think carefully about adversarial inputs, validation failures, and the difference between demonstrating a payment workflow and actually executing one. Keeping simulated demonstrations separate from payment operations was important for making the system easier to understand and safer to test.
Another challenge was making the safeguards visible. A security mechanism is more useful when a reviewer can see what was proposed, which checks were applied, and why the system allowed or rejected an action.
What We Learned
Building Holdfast Protocol reinforced three important lessons:
- AI recommendations and authorization are different things. An intelligent system should not automatically receive unrestricted financial authority.
- Security must be enforced outside the model. Critical payment rules need deterministic checks that do not depend on the model following instructions.
- Trust requires inspectable decisions. Clear policy outcomes, approval boundaries, and audit records make financial workflows easier to review.
We also learned how to connect a web application, backend safeguards, MCP capabilities, automated tests, and PayPal payment workflows into one coherent system.
What's Next
We want to extend Holdfast Protocol with stronger evidence verification, configurable policies, additional payment providers, and more comprehensive adversarial testing.
Our long-term vision is to provide a reusable trust layer for AI-powered commerce: one that allows AI agents to be useful while keeping financial actions governed by explicit, verifiable controls.
Holdfast Protocol — Payments for AI agents, with verifiable safeguards.
Built With
- api
- artificial
- claude-hussenet-anagram
- cryptography
- express.js
- gemini
- groq
- hmac-sha256
- javascript
- mcp
- node.js
- payments-gateway
- paypal
- react
- typescript
- vite
Log in or sign up for Devpost to join the conversation.