Seamlessly integrate multiple payment providers (M-Pesa, Airtel Money, KCB, Equity) into your AI applications with our comprehensive MCP-based framework.
- π What is PayLink?
- β¨ Key Features
- π Quick Start - Get Payment Processing in 5 Minutes
- π³ Available Payment Providers
- π£οΈ Roadmap
- π Resources & Community
- π€ Contributing
- π Security
- π License
PayLink is an open-source framework designed to simplify payment integrations for AI agents by leveraging the Model Context Protocol (MCP). It provides a standardized interface for various payment providers, including M-Pesa, Airtel, Equity Bank, and KCB, enabling seamless integration of payment functionalities into your AI applications.
- π³ Multi-Provider Support: M-Pesa, Airtel Money, Equity Bank, KCB
- π€ AI-First Design: Built specifically for AI agents and MCP integration
- π Secure Authentication: Enterprise-grade security with OAuth support
- π Instant Setup: Get payment processing running in minutes
- π± Mobile-First: Optimized for mobile payment workflows
- π East Africa Focus: Specialized for regional payment systems
Get instant access to payment processing with our managed infrastructure:
pip install paylinkfrom paylink import PayLink
# Initialize with your API key
paylink = PayLink(api_key="your-api-key")
# Create M-Pesa server instance
mpesa_server = paylink.create_server("mpesa", {
"business_shortcode": "your_shortcode",
"consumer_key": "your_consumer_key",
"consumer_secret": "your_consumer_secret"
})
# Initiate payment
result = await mpesa_server.stk_push(
amount="100",
phone_number="254797357665",
account_reference="PAYMENT001",
transaction_desc="Payment for services"
)# Clone the repository
git clone https://github.com/your-org/paylink.git
cd paylink
# Run M-Pesa server
cd mcp_servers/mpesa
docker build -t paylink-mpesa .
docker run -p 5002:5002 paylink-mpesa
# Run Airtel server
cd ../airtel
docker build -t paylink-airtel .
docker run -p 5003:5003 paylink-airtel# Install dependencies
cd mcp_servers/mpesa
pip install -r requirements.txt
# Set environment variables
export MPESA_CONSUMER_KEY="your_consumer_key"
export MPESA_CONSUMER_SECRET="your_consumer_secret"
export MPESA_BUSINESS_SHORT_CODE="your_shortcode"
export MPESA_PASSKEY="your_passkey"
export MPESA_CALLBACK_URL="https://yourdomain.com/callback"
# Run the server
python server.py| Provider | Status | Features | Docker Image |
|---|---|---|---|
| M-Pesa | π§ In Development | STK Push (Active Development), C2B, B2C | paylink-mpesa:latest |
| Airtel Money | π§ In Development | STK Push, USSD | paylink-airtel:latest |
| Equity Bank | π§ In Development | Bank Transfers | paylink-equity:latest |
| KCB | π§ In Development | Bank Transfers | paylink-kcb:latest |
- Complete M-Pesa STK Push support
- Add Airtel Money USSD support
- Implement Equity and KCB bank transfers
- Publish SDK for Node.js and Go
- Add webhook event framework
| Resource | Link | Description |
|---|---|---|
| π Documentation | paylink.mintlify.app | Complete guides and API reference |
| π Issues | GitHub Issues | Report bugs and request features |
| π¦ Examples | examples/ | Working examples with popular AI frameworks |
| π§ Server Guides | mcp_servers/ | Individual server documentation |
We love contributions! Whether you want to:
- π Report bugs or request features
- π Improve documentation
- π§ Build new MCP servers
- π¨ Enhance existing servers
Check out our Contributing Guide to get started!
If you discover a security vulnerability, please see our Security Policy for how to report it responsibly.
MIT License - see LICENSE for details.
π³ Powering AI-Powered Payments Across East Africa
Documentation β’ Issues β’ Examples