PayPal Agent Toolkit

By PayPalCreated 6 days ago
starstarstarstarstar

The PayPal Agent Toolkit enables popular agent frameworks including OpenAI's Agent SDK, LangChain, Vercel's AI SDK, and Model Context Protocol (MCP) to integrate with PayPal APIs through function calling. It includes support for TypeScript and is built on top of PayPal APIs and the PayPal SDKs.

Visit Project
Share this MCP:
X (Formerly Twitter)RedditblueskyThreads by Instagram

Category

Official MCP Server

Tags

PaypalApi IntegrationAgent FrameworksTypescriptPaymentsInvoicing

PayPal Agent Toolkit

What is the PayPal Agent Toolkit?

The PayPal Agent Toolkit is a TypeScript library that enables popular AI agent frameworks (OpenAI's Agent SDK, LangChain, Vercel's AI SDK, and Model Context Protocol) to integrate with PayPal APIs through function calling. It provides tools for managing invoices, payments, disputes, shipping, catalog, subscriptions, and reporting.

How to use the PayPal Agent Toolkit?

  1. Install the package via npm:
    npm install @paypal/agent-toolkit
    
  2. Configure with your PayPal credentials (client ID and secret from PayPal Developer Dashboard)
  3. Initialize the toolkit with your chosen agent framework
  4. Use the tools to interact with PayPal services through natural language prompts

Key features of the PayPal Agent Toolkit?

  • Payment Processing: Create orders, process payments, and issue refunds
  • Invoice Management: Create, list, send, and manage invoices with QR codes
  • Dispute Handling: Manage dispute claims and resolutions
  • Shipping Tracker: Create and track shipment records
  • Catalog Management: Manage product listings
  • Subscription Control: Create and manage subscription plans and subscriptions
  • Comprehensive Reporting: Access transaction histories and financial reporting
  • MCP Support: Integration with Model Context Protocol for various AI hosts
  • TypeScript Typed: Fully typed for robust development

Use cases of the PayPal Agent Toolkit?

  1. E-commerce platform adding automated payment and invoice processing
  2. Marketplace managing disbargements with full tracking of orders and payments
  3. Subscription-based service handling recurring billing and customer management
  4. Merchants needing automated QR code generation for point-of-sale transactions
  5. Financial analysts requiring comprehensive transaction reporting
  6. Developers using AI agents to interact with PayPal services through natural language

FAQ about the PayPal Agent Toolkit

Q: What frameworks does the toolkit support? A: It works with OpenAI's Agent SDK, LangChain, Vercel's AI SDK, and Model Context Protocol (MCP).

Q: How do I get PayPal API credentials? A: Obtain a client ID and secret through your PayPal Developer Dashboard, under Apps & Credentials.

Q: What is the difference between Sandbox and Production environments? A: Sandbox is for testing and development, while Production handles real transactions. They require different credentials and URLs.

Q: How long does an access token last? A: Sandbox tokens last 3-8 hours, and production tokens last 8 hours. Implement token refresh logic for production use.

Q: Is there a tool for managing all PayPal services? A: Yes, initialize PayPalWorkflows with ALL_TOOLS_ENABLED to access the full suite of services.