PayPal Agent Toolkit
by PayPal
The PayPal Agent Toolkit enables integration with PayPal APIs through function calling for popular agent frameworks like OpenAI's Agent SDK and LangChain. It supports TypeScript and is built on top of PayPal APIs and SDKs.
Last updated: N/A
What is PayPal Agent Toolkit?
The PayPal Agent Toolkit is a collection of tools that allows agent frameworks (like OpenAI's Agent SDK, LangChain, Vercel's AI SDK, and Model Context Protocol) to interact with PayPal APIs. It provides functions for managing invoices, orders, disputes, shipments, products, subscription plans, subscriptions, and transactions.
How to use PayPal Agent Toolkit?
The toolkit can be installed via npm (npm install @paypal/agent-toolkit
). It requires Node 18+ and needs to be configured with your PayPal client ID and secret. The toolkit can be used with Vercel's AI SDK by passing the toolkit's tools to the SDK. It can also be used with a custom Model Context Protocol (MCP) server or integrated with MCP hosts like Claude Desktop by configuring the necessary settings and providing a PayPal access token.
Key features of PayPal Agent Toolkit
Function calling integration with PayPal APIs
Support for various agent frameworks
TypeScript support
Tools for managing invoices, orders, disputes, shipments, products, subscriptions, and transactions
Integration with Model Context Protocol (MCP)
Use cases of PayPal Agent Toolkit
Automated invoice creation and management
Order processing and payment capture
Dispute resolution
Shipment tracking
Product catalog management
Subscription management
Transaction history retrieval
Integration with AI assistants for PayPal tasks
FAQ from PayPal Agent Toolkit
How do I get my PayPal Client ID and Secret?
How do I get my PayPal Client ID and Secret?
You can find your Client ID and Secret in the PayPal Developer Dashboard under Apps & Credentials.
What is a PayPal Access Token and how do I generate one?
What is a PayPal Access Token and how do I generate one?
A PayPal Access Token is required to authenticate your requests to the PayPal API. You can generate one using cURL or Postman with your Client ID and Secret, as described in the documentation.
How long are PayPal Access Tokens valid?
How long are PayPal Access Tokens valid?
Sandbox tokens are valid for 3-8 hours, while production tokens are valid for 8 hours. It is recommended to implement token refresh logic.
What environment variables are supported?
What environment variables are supported?
The toolkit supports PAYPAL_ACCESS_TOKEN
and PAYPAL_ENVIRONMENT
environment variables. PAYPAL_ENVIRONMENT
can be set to SANDBOX
or PRODUCTION
.
How do I integrate the PayPal connector with Claude Desktop?
How do I integrate the PayPal connector with Claude Desktop?
You need to configure the PayPal connector in Claude Desktop's claude_desktop_config.json
file with your PayPal Access Token and environment settings.