Skip to main content
The Cashfree Payments Agent Toolkit enables popular agent frameworks including LangChain, Vercel’s AI SDK, and OpenAI’s Agents SDK to integrate with Cashfree APIs through function calling. Build AI-powered payment agents that can create orders, process refunds, and manage customers programmatically.

Pre-requisites

Ensure you meet the following requirements to get started with the Cashfree Agent Toolkit:

Installation

Install the toolkit using your preferred package manager:

Framework support

The toolkit supports multiple frameworks, exposed through sub-paths:

Usage

Each toolkit is initialised with your Cashfree credentials and environment configuration.

Available tools

The toolkit provides the following tools for payment operations:

Framework-specific examples

The following examples demonstrate how to use the toolkit with each supported framework.
The OpenAI integration works with both Chat Completions API and the Agents SDK.

Initialise the toolkit

Set up the Cashfree Agent Toolkit with your credentials and environment configuration.

With Chat Completions API

Use the toolkit with OpenAI’s Chat Completions API by passing the tools as JSON schema.

With OpenAI Agents SDK

Integrate the toolkit with OpenAI’s Agents SDK for building autonomous payment agents.
For detailed OpenAI documentation, see the OpenAI integration guide.

Example payment agent

The following example demonstrates a complete payment agent using the OpenAI Agents SDK:

Resources

Explore additional resources to help you get started with the Cashfree Agent Toolkit.

GitHub Repository

View the source code, report issues, and contribute to the toolkit.

npm Package

View the package on npm for installation and version details.