Connect AI frameworks to Zip Payment Services with minimal configuration. Compatible with OpenAI's Agent SDK, LangChain, Vercel's AI SDK, and Model Context Protocol (MCP).
- Node 18+
npm install @zipph/ai-toolkit
import {ZipAIToolkit} from '@zipph/ai-toolkit/langchain';
const zipAIToolkit = new ZipAIToolkit({
secretKey: process.env.ZIP_SECRET_KEY!,
configuration: {
actions: {
customers: {create: true},
charges: {create: true},
},
},
});
// Get tools for your AI framework
const tools = zipAIToolkit.getTools();
import {AgentExecutor, createStructuredChatAgent} from 'langchain/agents';
const agent = await createStructuredChatAgent({
llm,
tools,
prompt,
});
const agentExecutor = new AgentExecutor({
agent,
tools,
});
npx -y @zipph/mcp --tools=all --secret-key=YOUR_ZIP_SECRET_KEY
import {ZipAIToolkit} from '@zipph/ai-toolkit/modelcontextprotocol';
import {StdioServerTransport} from '@modelcontextprotocol/sdk/server/stdio.js';
const server = new ZipAIToolkit({
secretKey: process.env.ZIP_SECRET_KEY!,
configuration: {
actions: {
customers: {create: true},
charges: {create: true},
checkoutSessions: {create: true},
},
},
});
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error('Zip MCP Server running on stdio');
}
main().catch(console.error);
For more examples, see the /examples
directory in the repository.
The toolkit is configured by specifying which API actions are enabled:
const zipAIToolkit = new ZipAIToolkit({
secretKey: process.env.ZIP_SECRET_KEY!,
configuration: {
actions: {
customers: {
create: true,
read: true,
},
charges: {
create: true,
read: true,
},
// Add other API methods as needed
},
},
});
Your Zip secret key is available in your Zip Dashboard