Build AI agents that can send real money using natural language with LangChain and Payman. Paychain combines the power of LLMs with Payman's secure payment infrastructure to enable conversational financial transactions.
- π€ Natural Language Payments: Let AI agents process payments through simple conversations
- π Built on Payman: Leverage Payman's enterprise-grade payment infrastructure
- π Quick Integration: Get started in minutes with our Python SDK
- π‘ Flexible Tools: Rich set of Payman payment operations including sending, requesting, and managing payees
- π οΈ Built with LangChain: Leverage the power of the LangChain ecosystem
-
Get your API keys:
- Go to app.paymanai.com to get your Payman API key
- Sign up takes just a few seconds and lets you send real money with Payman
- Get your OpenAI API key from platform.openai.com
-
Clone the repository:
git clone <repository-url>
cd paychain-examples
- Create and activate virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory:
PAYMAN_API_SECRET=your_payman_api_secret # From app.paymanai.com
OPENAI_API_KEY=your_openai_api_key
PAYMAN_ENVIRONMENT=sandbox # or production
- Run the tests:
# Test basic payment functionality
python examples/test_payment.py
# Test AI agent with all payment tools
python examples/test_agent.py
- Direct payment processing
- AI agent with natural language payment processing
- Multiple payment tools:
- Send payments
- Search payees
- Add new payees
- Request money
- Check balances
paychain-examples/
βββ .env # Environment variables (not in git)
βββ .gitignore # Git ignore file
βββ requirements.txt # Project dependencies
βββ examples/ # Test examples
βββ __init__.py
βββ test_agent.py # AI agent test
- Never commit your
.env
file - Keep your API keys secure
- Use sandbox environment for testing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT