Add Stripe to your agentic workflows
Use financial services with agents.
Use Stripe to run your agent business and enhance your agents’ functionality. By enabling access to financial services and tools, you allow your agents to help you earn and spend funds, expanding their capabilities.
Create Stripe objects
Use function calling to create and manage Stripe objects. For example, dynamically create Payment Links to accept funds, integrate into your support workflows to help customers, and scaffold test data.
The Stripe agent toolkit supports OpenAI’s Agents SDK, Vercel’s AI SDK, LangChain, and CrewAI. It works with any LLM provider that supports function calling and is compatible with Python and TypeScript.
import asyncio import os from agents import Agent, Runner from stripe_agent_toolkit.openai.toolkit import create_stripe_agent_toolkit async def main(): # Initialize toolkit - use restricted key (rk_*) for better security toolkit = await create_stripe_agent_toolkit( secret_key=os.getenv("STRIPE_SECRET_KEY") ) try: agent = Agent( name="Stripe Agent", instructions="Integrate with Stripe effectively to support business needs.", tools=toolkit.get_tools() ) assignment = "Create a payment link for a new product called \"Test\" with a price of $100." result = await Runner.run(agent, assignment) print(result.final_output) finally: await toolkit.close() if __name__ == "__main__": asyncio.run(main())
Developer preview
Learn how to use this SDK to integrate Stripe into agentic workflows. Because agent behaviour is non-deterministic, use the SDK in a sandbox and run evaluations to assess your application’s performance.
For security, we strongly recommend using restricted API keys (rk_) to limit your agent’s access to only the functionality it requires, especially in live mode. Tool availability is determined by the permissions you configure on the restricted key.