Reference implementation for Visa Intelligent Commerce with AI-powered shopping agent
This repository contains a full-fledged reference application demonstrating end-to-end Visa Intelligent Commerce (VIC) capabilities with an AI-powered shopping agent. The application showcases complete integrations with:
- π Visa Intelligent Commerce (VIC) - End-to-end agentic commerce flow with AI-driven product discovery and checkout
- π« Visa Token Service (VTS) - Payment token provisioning and management for secure transactions
- π Visa Payment Passkey (VPP) - WebAuthn passkey authentication for frictionless, secure checkout
- π€ AI Shopping Agent - Conversational product search and personalized recommendations using LangGraph
- π Model Context Protocol (MCP) - Tool-based AI interactions for seamless shopping experiences
Note: VIC (Visa Intelligent Commerce) is Visa card network centric. This reference implementation is designed specifically for the Visa card network and does not support other payment card networks.
The application consists of 5 microservices:
ββββββββββββββββββββββββββββββββββ
β Reference Agent Frontend β
β (React - HTTPS Port 3000) β
β - Shopping Agent UI β
β - Card Management UI β
β - VPP Integration via VTS β
ββββββββββββββββββ¬ββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββ
β Reference Agent Backend β
β (FastAPI - Port 8000) β
β - Shopping Agent β
β - Card/Token Management β
β - VTS/VIC Integration β
ββββββββββββββββββ¬ββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β Reference Merchant MCP β β Reference Merchant Frontend β
β (Express - Port 8002) β β (React - Port 3001) β
β - MCP Tool Server β β - Product Browsing β
β - AI Shopping Tools β β - Cart Management β
β - Form Elicitation β β - Checkout Flow β
ββββββββββββββββββ¬ββββββββββββββββ ββββββββββββββββ¬ββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββββ
β Reference Merchant Backend β
β (FastAPI - Port 8001) β
β - Product API β
β - Cart API β
β - Order API β
ββββββββββββββββββββββββββββββββββ
Before you begin, ensure you have:
- Docker and Docker Compose (recommended for running the application)
- mkcert (for generating HTTPS certificates)
- Node.js 22+ (only required for local development without Docker)
- Python 3.12.8+ (only required for local development without Docker)
Contact your Visa representative to obtain:
- Visa Token Service (VTS) credentials
- Visa Intelligent Commerce (VIC) credentials
- Token Requestor (TR) credentials
- Message Level Encryption (MLE) keys
- Visa Payment Passkey (VPP) credentials
You will also need:
- LLM API credentials (OpenAI or Anthropic) for the AI agent
Important: Developers must obtain their own LLM provider credentials separately. The LLM API credentials (OpenAI or Anthropic) are not Visa API credentials and must be acquired directly from the respective LLM providers.
The easiest way to run the entire application is with Docker Compose.
In order for the passkey integration to work properly, the frontend must use HTTPS, which means that a trusted SSL certificate is needed for localhost.
Install mkcert:
- macOS:
brew install mkcert - Windows:
choco install mkcert - See mkcert repository for other installation methods
Add the root CA (one-time operation):
mkcert -installGenerate certificates:
cd reference-agent-frontend
mkcert localhost 127.0.0.1 ::1
cd ..Set up the reference-agent-backend environment:
cd reference-agent-backend
cp .env.sample .env
# Edit .env and fill in all credentials
cd ..Set up the reference-agent-frontend environment:
cd reference-agent-frontend
cp .env.sample .env
# Edit .env and fill in all credentials
cd ..From the project root:
docker-compose up --buildThis will start all 5 services:
- reference-agent-frontend: https://localhost:3000
- reference-agent-backend: http://localhost:8000
- reference-merchant-frontend: http://localhost:3001
- reference-merchant-backend: http://localhost:8001
- reference-merchant-mcp: http://localhost:8002
See USER_GUIDE.md for a step-by-step walkthrough of adding cards, setting up passkeys, and shopping with the AI agent.
docker-compose downvic-reference-agent/
βββ reference-agent-backend/ # FastAPI backend with AI agent
βββ reference-agent-frontend/ # React frontend for AI shopping
βββ reference-merchant-backend/ # FastAPI backend for merchant
βββ reference-merchant-frontend/ # React frontend for merchant
βββ reference-merchant-mcp/ # MCP server for shopping tools
βββ docker-compose.yml # Docker Compose configuration
βββ README.md # This file
Each subdirectory has its own README with detailed setup instructions for local development.
If you prefer not to use Docker Compose, you can run each service individually. Each subdirectory contains its own README with setup and run instructions:
- reference-agent-backend/README.md
- reference-agent-frontend/README.md
- reference-merchant-backend/README.md
- reference-merchant-frontend/README.md
- reference-merchant-mcp/README.md
When running services individually, start them in this order:
- reference-merchant-backend (port 8001)
- reference-merchant-mcp (port 8002) - depends on merchant backend
- reference-agent-backend (port 8000) - depends on merchant MCP
- reference-merchant-frontend (port 3001) - depends on merchant backend
- reference-agent-frontend (port 3000) - depends on agent backend
Having issues? See TROUBLESHOOTING.md for common problems and solutions.
For issues and questions, please open an issue in the repository.
For Visa API credentials and support, contact your Visa representative.