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.
The PayPal Agent toolkit provides the following tools:
Invoices
create_invoice: Create a new invoice in the PayPal system, including recipient billing details, line items, an invoice note, a custom color theme, an optional shipping cost, and an option to enable PAY_BY_BANK as a payment methodcreate_recurring_series: Create a recurring invoice series that automatically generates and sends invoices on a schedulelist_invoices: List invoices with optional pagination and filteringget_invoice: Retrieve details of a specific invoicesend_invoice: Send an invoice to recipientssend_invoice_reminder: Send a reminder for an existing invoicecancel_sent_invoice: Cancel a sent invoicegenerate_invoice_qr_code: Generate a QR code for an invoice
Payments
create_order: Create an order in PayPal system based on provided detailsget_order: Retrieve the details of an orderpay_order: Process payment for an authorized ordercreate_refund: Process a refund for a captured payment.get_refund: Get the details for a specific refund.
Dispute Management
list_disputes: Retrieve a summary of all open disputesget_dispute: Retrieve detailed information of a specific disputeaccept_dispute_claim: Accept a dispute claim
Shipment Tracking
create_shipment_tracking: Create a shipment tracking recordget_shipment_tracking: Retrieve shipment tracking informationupdate_shipment_tracking: Update shipment tracking information
Catalog Management
create_product: Create a new product in the PayPal cataloglist_products: List products with optional pagination and filteringshow_product_details: Retrieve details of a specific product
Subscription Management
create_subscription_plan: Create a new subscription planlist_subscription_plans: List subscription plansshow_subscription_plan_details: Retrieve details of a specific subscription plancreate_subscription: Create a new subscriptionshow_subscription_details: Retrieve details of a specific subscriptionupdate_subscription: update an existing subscriptioncancel_subscription: Cancel an active subscription
Reporting and Insights
list_transactions: List transactions with optional pagination and filteringget_merchant_insights: Retrieve business intelligence metrics and analytics for a merchant
You don't need this source code unless you want to modify the package. If you just want to use the package run:
npm install @paypal/agent-toolkit