A complete developer toolkit for building with Investec APIs using AI assistants like Claude, ChatGPT, and Copilot
Quick Start β’ Documentation β’ AI Prompts β’ Examples β’ Community
Get from idea to working Investec integration in minutes, not hours. This sandbox includes everything you need to build production-ready banking applications using AI assistants:
14 comprehensive prompts for real banking scenarios - copy-paste into ChatGPT, Claude, or Copilot for instant working code
Local Investec API server with realistic South African banking data, proper OAuth, and chaos testing
Visual web interface + CLI tool demonstrating the correct Investec client_credentials authentication flow
Simulate latency, errors, and rate limits to build robust applications
git clone https://github.com/investec-developer-community/ai-sandbox.git
cd ai-sandboxcd mock-server
npm install
npm startπ Your mock Investec API is now running at http://localhost:3000 with:
- Realistic account and transaction data
- OAuth client_credentials endpoint
- Swagger UI docs at
/docs - Health monitoring at
/health
# In a new terminal
cd ../token-playground
npm install
npm run webπ Open http://localhost:3001 for an interactive OAuth flow walkthrough
- Open
prompt-pack/prompts.md - Copy any prompt into ChatGPT, Claude, or Copilot
- Get instant, working Investec integration code!
|
14 production-ready prompts covering:
|
Local Investec API featuring:
|
|
Master OAuth 2.0 with:
|
Test resilience using:
|
|
Fintech Developers Building Investec integrations |
Hackathon Teams Rapid banking app prototyping |
AI Enthusiasts Using ChatGPT/Claude for coding |
Banking API Learners Understanding financial APIs |
Prompt: "Build a Python spending tracker using Investec API that monitors card transactions and sends alerts when monthly budget is exceeded"
Result: Complete working Python application with proper authentication, error handling, and webhooks- Spending Trackers - Monitor transactions by category
- Budget Alerts - WhatsApp notifications for overspending
- Spare Change - Round up purchases, save the difference
- Family Allowances - Manage spending limits for family members
- Bill Automation - Smart payment scheduling with balance checks
- Merchant Analysis - Dashboard for spending patterns and trends
- Multi-Account - Portfolio tracking across different account types
- Fraud Detection - Alert systems for unusual spending patterns
- Personal Banking: Account information, transactions, balances
- Programmable Banking: Card controls, transaction monitoring
- Foreign Exchange: Multi-currency operations
- Business Banking: Commercial account management
- OAuth 2.0 Client Credentials flow (correct for Investec APIs)
- Basic Authentication with client_id:client_secret
- API Key validation via x-api-key header
- Token refresh handling and error recovery
POST /identity/v2/oauth2/token # OAuth authentication
GET /za/pb/v1/accounts # List accounts
GET /za/pb/v1/accounts/{id}/balance # Account balance
GET /za/pb/v1/accounts/{id}/transactions # Transaction history
| Component | Description | Quick Link |
|---|---|---|
| Getting Started | Setup instructions and overview | Main README |
| AI Prompts | 14 ready-to-use prompts for AI assistants | Prompt Pack |
| Mock Server | Local Investec API with realistic data | Mock Server Guide |
| OAuth Playground | Interactive authentication learning tool | OAuth Guide |
| Chaos Testing | Resilience testing and error simulation | Chaos Guide |
| API Alignment | How sandbox matches real Investec APIs | API Alignment |
cd mock-server
docker-compose up --build# Simulate 500ms latency and 10% error rate
CHAOS_LATENCY_MS=500 CHAOS_ERROR_RATE=0.1 npm start// Configure for your environment
const config = {
client_id: 'your-client-id',
client_secret: 'your-client-secret',
api_key: 'your-api-key',
base_url: 'https://openapisandbox.investec.com'
};| Scenario | Prompt | AI Assistant |
|---|---|---|
| Spending Tracker | Prompt #1 | ChatGPT, Claude, Copilot |
| Budget Alerts | Prompt #2 | ChatGPT, Claude, Copilot |
| OAuth Setup | Prompt #5 | ChatGPT, Claude, Copilot |
| Bill Automation | Prompt #7 | ChatGPT, Claude, Copilot |
| API Debugging | Prompt #9 | ChatGPT, Claude, Copilot |
| Learning Guide | Prompt #11 | ChatGPT, Claude, Copilot |
Want your project featured here? Submit a PR or open an issue!
Coming soon! Share your Investec AI-powered applications with the community.- π€ Additional AI Prompts - Expand the prompt library
- π§ Integration Examples - Real-world implementation patterns
- π Tutorials - Step-by-step guides for specific use cases
- π Bug Reports - Help improve the sandbox
We welcome contributions from the Investec developer community!
- π€ Add AI Prompts - Expand the prompt library
- π§ Improve Mock Data - Enhance realism in
mock-server/ - π Update Documentation - Keep guides current and helpful
- π Report Issues - Help us fix bugs and improve UX
- π‘ Suggest Features - Ideas for new sandbox capabilities
git clone https://github.com/investec-developer-community/ai-sandbox.git
cd ai-sandbox
# Install dependencies for both components
cd mock-server && npm install && cd ..
cd token-playground && npm install && cd ..
# Start mock server (terminal 1)
cd mock-server && npm start
# Start OAuth playground (terminal 2)
cd ../token-playground && npm run web- Follow the existing code style and patterns
- Update documentation for any new features
- Test your changes with the mock server
- Include examples in AI prompts
- π Bug Reports: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Official Docs: Investec Developer Portal
- πΌ LinkedIn: Investec Developer Community
- π§ Join the community: Developer Updates
- π Mock Credentials Only - Never use sandbox credentials in production
- π‘οΈ Follow Best Practices - See Investec Security Guidelines
- π Secure Your Keys - Keep real API credentials safe and private
- π§ͺ Sandbox:
https://openapisandbox.investec.com(testing) - π Production:
https://openapi.investec.com(live transactions)
- Sandbox: Generous limits for development and testing
- Production: See current limits
This project is licensed under the MIT License - see the LICENSE file for details.
- Node.js packages: Various licenses (see individual package.json files)
- Swagger/OpenAPI specifications: Investec API Terms
Built with β€οΈ by the Investec Developer Community
Special Thanks:
- Investec API Team for comprehensive documentation
- Open source community for excellent tooling
- AI platforms (OpenAI, Anthropic) for making development more accessible
- All developers who contribute examples and feedback
Ready to build the future of banking with AI?
β Star this repo if it helped you build something awesome!
π Get Started β’ π¬ Join Discussion β’ π Report Issue
Made with π€ AI assistance and β€οΈ for the developer community