What is PayLink?
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 and Airtel, enabling seamless integration of payment functionalities into your AI applications.How It Works
PayLink SDK connects to a PayLink MCP server via Server-Sent Events (SSE), allowing your application to:- Discover available payment tools on the server
- Call payment tools with appropriate arguments
- Process payment results from the tools
Getting Started with PayLink
Before using the PayLink SDK, you need to complete the following setup steps:- Create a PayLink Account: Sign up for a PayLink account to obtain your API key
- Configure Payment Providers: Set up the payment providers you want to use
- Add Payment Provider Keys: Configure the necessary credentials for each provider
Required Configuration
When initializing the PayLink SDK, you’ll need to provide the following:- PayLink API Key: Your unique API key from your PayLink account
- PayLink Project: Your project identifier
- Payment Providers: List of payment providers you want to use
- Provider-specific Keys: Credentials for each payment provider
Architecture Overview
The PayLink ecosystem consists of three main components:- PayLink Server: Hosts payment tools and connects to payment providers
- PayLink SDK: Client libraries for connecting to the server
- Payment Providers: External services like M-Pesa, Airtel, etc.
Available SDK Clients
Framework Integrations
PayLink SDK provides specialized adapters for popular AI frameworks, making it easy to integrate payment functionality into AI-driven applications:- OpenAI Compatible: Use PayLink with OpenAI’s function-calling API to enable AI agents to process payments.
- LangChain Compatible: Integrate PayLink with LangChain agents for building payment-enabled AI workflows.
Getting Started
To start using the PayLink SDK, you’ll need to:- Create a PayLink Account to obtain your API key
- Configure Payment Providers in your PayLink dashboard
- Set up Provider Credentials for your chosen payment methods