PayPal AI Billing MCP Gateway
Integrates with PayPal Sandbox REST APIs and official PayPal MCP tools to manage invoices, orders, payments, captures, refunds, subscriptions, products, disputes, transaction history, receipts, and merchant insights through 82 unified MCP tools.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PayPal AI Billing Kit (v1.9.0)
AI-Powered Invoicing, Mistake-Recovery Workflows, Conversational Authorization, Automated Sandbox Card Checkout, Merchant-Branded PDF Receipts & Unified 82-Tool Model Context Protocol (MCP) Gateway for PayPal Sandbox.
Live Public Endpoints
Endpoint | Public URL | Purpose |
Web Application (Vercel) |
| Interactive Provider & Customer Billing Dashboard (Desktop & Mobile Web) |
Dedicated Unified MCP Gateway (Cloudflare Worker) |
| Primary JSON-RPC 2.0 MCP Server ( |
Vercel MCP Mirror |
| Mirror JSON-RPC 2.0 MCP endpoint |
OpenAPI 3.1.0 Spec |
| Machine-readable OpenAPI 3.1.0 schema for ChatGPT Custom GPT Actions |
Interactive MCP Docs |
| Human-readable MCP documentation and curl examples |
Downloadable PDF Receipt API (Sample Link) |
| Sample PDF 1.4 receipt ( |
Related MCP server: Braintree MCP Server
Overview
PayPal AI Billing Kit is a standalone, open-source AI billing and payment application built for the PayPal AI Hackathon 2026. It pairs a multi-role Billing Dashboard (Provider & Customer perspectives) with an in-app Gemini 3.5 Flash-Lite Billing AI Assistant (thinkingLevel: "MEDIUM") and a Unified 82-Tool Model Context Protocol (MCP) Gateway connected to PayPal Sandbox REST v1/v2/v3 APIs (api-m.sandbox.paypal.com) and Official PayPal MCP Discovery (mcp.sandbox.paypal.com/sse).
Key Capabilities
Unified 82-Tool MCP Gateway (
https://paypal-ai-billing-mcp.apd1034.workers.dev/mcp):21 Native Application Tools (
source: "native_application"): Customer lookup, invoice search, balance explanation, transaction history, structured + PDF receipts (get_payment_receipt,generate_receipt_pdf), session-isolated audit logs, business metrics, proposal creation, real PayPal Sandbox wallet & card order creation/capture/refund, unpaid invoice voiding, and conversational command execution.47 Official PayPal MCP Tools (
source: "official_paypal_mcp"):paypal_discover_official_mcpplus all 46 official PayPal MCP tools registered by their exact official names (create_invoice,create_recurring_series,activate_recurring_series,get_recurring_series,cancel_recurring_series,delete_recurring_series,list_invoices,get_invoice,send_invoice,send_invoice_reminder,cancel_sent_invoice,delete_invoice,setup_invoice_auto_reminders,update_invoice_auto_reminder,search_invoicing,update_invoicing,cancel_invoice_auto_reminder,generate_invoice_qr_code,generate_invoice_number,record_payment_for_invoice,record_refund_for_invoice,create_conditional_rules_for_invoice,create_product,list_products,update_product,show_product_details,create_subscription_plan,list_subscription_plans,show_subscription_plan_details,create_subscription,show_subscription_details,cancel_subscription,update_subscription,create_shipment_tracking,get_shipment_tracking,update_shipment_tracking,create_order,get_order,pay_order,list_disputes,get_dispute,accept_dispute_claim,list_transactions,create_refund,get_refund,get_merchant_insights).14 PayPal Sandbox REST-to-MCP Adapter Tools (
source: "paypal_rest_adapter"): 8 existing (paypal_get_order,paypal_get_refund,paypal_list_invoices,paypal_generate_invoice_number,paypal_list_disputes,paypal_check_card_eligibility,execute_sandbox_card_payment,run_sandbox_card_lifecycle_test) + 6 new (update_plan,paypal_authorize_order,paypal_list_webhooks,paypal_list_webhook_event_types,paypal_list_invoice_templates,paypal_create_vault_setup_token).Permission Tiers:
39read_only,3proposal_only, and40confirmed_demo_write.
Automated Server-Side PayPal Sandbox Direct-Card Checkout (
Orders v2 payment_source.card):Alongside standard PayPal Wallet Checkout (
PAYER_ACTION_REQUIRED→ buyer approval URL) and explicitly labeled Demo Settlement Simulation, supports server-side PayPal Sandbox card payments using allowlisted developer test card profiles (visa_sandbox,mastercard_sandbox,amex_sandbox,decline_refused,decline_expired,decline_insufficient_funds) for automatedOrder → Capture → Receipt → Refundverification without exposing or accepting raw card numbers (RAW_CARD_CREDENTIALS_FORBIDDEN).
8-State Payment-Attempt Classification & Session-Isolated Audit Trail:
Distinguishes
awaiting_buyer_approval,approval_required(ORDER_NOT_APPROVED),payment_declined,buyer_canceled,authorized,captured,refunded, andprocessing_errorso premature capture attempts never inflate declined-card metrics.Enforces strict session and role isolation on
get_financial_audit_history(canonical_seedvssession_private).
Dual Authorization Model (Cryptographic Proposals + Conversational Authorization):
HMAC-SHA256 Proposal Tokens (
PPB-PROP-1...): Server-persisted inpublic.billing_ai_action_proposalswith 30-minute expiration, parameter binding, and single-use consumption.Explicit Conversational Authorization (
evaluateConversationalAuthorization): Direct user instructions (e.g., "Create a $35 invoice for Alex Rivera for immunization", "Pay Alex Rivera's $35 invoice", "Refund $20 on invoice PPB-INV-2026-1003", "Void unpaid invoice PPB-INV-2026-1001") execute immediately within$500single-action and$2,500daily guardrails, while capability questions ("Can you refund invoices?") and hypothetical questions ("What would happen if I paid?") never trigger writes.
Real End-to-End PayPal Sandbox Payments & Refunds:
Creates real PayPal Sandbox Orders (
POST /v2/checkout/orders), enforces genuine buyer approval onsandbox.paypal.com, captures payments (POST /v2/checkout/orders/{id}/capture), and executes partial or full refunds (POST /v2/payments/captures/{id}/refund).
Professional Merchant-Branded PDF 1.4 Receipts:
Dynamically generates a unique, merchant-first downloadable PDF receipt (
GET /api/receipts/:invoice_number.pdf) and base64-encoded PDF insideget_payment_receiptandgenerate_receipt_pdffor every paid or refunded statement (#PPB-INV-2026-1003.pdfis provided above as a sample PDF for quick viewing, while all live PayPal Sandbox transactions generate their own unique receipt with their real PayPal Order, Capture, and Refund IDs). Features Jenkins Wellness & Telehealth Practice (Provider: Dr. Sarah Jenkins), distinct state titles (Payment Receipt — Paid,Payment & Refund Receipt — Refunded,Payment Receipt — Partially Refunded,Sample Demo Receipt — Not a Real PayPal Payment), card brand & last 4 digits,"Payment processed through PayPal"attribution, and"This receipt was generated electronically. Please retain it for your records."footer.
Connecting ChatGPT MCP to PayPal AI Billing Kit
Open ChatGPT → Settings → Connectors / Developer Mode (MCP).
Add a new MCP Server with:
MCP Server URL:
https://paypal-ai-billing-mcp.apd1034.workers.dev/mcpAuthentication: None required for isolated visitor demo sessions (or OAuth 2.0 auto-discovered via
/.well-known/oauth-authorization-server).
Refresh the connector and try these prompts directly in ChatGPT:
Show me Alex Rivera's pending invoices.
Explain Jordan Taylor's failed payment.
Create a $35 invoice for Alex Rivera for immunization.
Prepare payment for Alex Rivera's $35 invoice.
Pay Alex Rivera's $35 invoice PPB-INV-2026-1002.
Give me the payment receipt and PDF download link for PPB-INV-2026-1003.
Refund $15 on invoice PPB-INV-2026-1003.
Inspect PayPal Sandbox order 4G312456A5669123W using paypal_get_order.
Show me the financial audit history.Application Walkthrough & Screenshots (docs/screenshots/)
1. Provider Dashboard & Connected PayPal Sandbox Status

2. Customer Perspectives (Alex Rivera & Jordan Taylor)
Alex Rivera (Pending & Paid Invoices) | Jordan Taylor (Failed Payment & Recovery) |
|
|
3. Invoice Creation & PayPal Sandbox Connection Controls
Create Invoice Modal | PayPal Sandbox Connected | PayPal Sandbox Disconnected |
|
|
|
4. Failed Payment Recovery, Billing AI Assistant, Unified MCP Modal & Guardrails
Failed Payment Retry ( | Billing AI Assistant |
|
|
Unified MCP Agent Interface (82 Tools) | Financial Guardrails & Audit Trail |
|
|
Complete 82-Tool Unified MCP Reference (21 Native + 47 Official PayPal MCP + 14 PayPal REST Adapters)
Tier 1 — Read-Only Discovery, Receipts & PayPal Sandbox Inspection (39 Tools)
Tool Name | Source | Description |
|
| Returns system capabilities, guardrails ( |
|
| Lists fictional demo customers ( |
|
| Filters invoices by customer name, status ( |
|
| Returns full line-item breakdown, PayPal Order/Capture IDs, payment transactions, and refund history. |
|
| Summarizes unpaid balances, overdue invoices, and failed payment recovery steps. |
|
| Lists PayPal Order creations, captures, refunds, and failure diagnostics. |
|
| Generates a structured payment receipt plus downloadable PDF URL ( |
|
| Generates and validates a binary PDF 1.4 receipt for a paid or refunded statement (refuses unpaid invoices). |
|
| Lists session-isolated append-only audit entries from |
|
| Verifies live PayPal Sandbox OAuth 2.0 connectivity and merchant connection status. |
|
| Computes total invoiced, collected, outstanding, refunded, and genuine failed payment metrics. |
|
| Probes PayPal's official remote MCP server ( |
|
| Retrieves a recurring invoice series by ID ( |
|
| Lists invoices from PayPal Invoicing v2 with pagination ( |
|
| Retrieves a PayPal Sandbox invoice by ID ( |
|
| Searches PayPal invoices or recurring series ( |
|
| Generates a QR code image payload for a PayPal invoice ( |
|
| Generates the next sequential PayPal invoice number ( |
|
| Lists PayPal Catalog Products ( |
|
| Retrieves details of a PayPal Catalog Product ( |
|
| Lists PayPal Subscription Plans ( |
|
| Retrieves PayPal Subscription Plan details ( |
|
| Retrieves PayPal Subscription details ( |
|
| Retrieves shipment tracking information ( |
|
| Retrieves PayPal Checkout Order details ( |
|
| Lists PayPal Customer Disputes ( |
|
| Retrieves details of a specific PayPal dispute ( |
|
| Lists PayPal Reporting Transactions ( |
|
| Retrieves details of a PayPal Refund ( |
|
| Retrieves PayPal Merchant Insights ( |
|
| Fetches a live PayPal Sandbox Order ( |
|
| Fetches a live PayPal Sandbox Refund ( |
|
| Lists invoices from the PayPal Sandbox Invoicing v2 API ( |
|
| Generates the next PayPal Sandbox invoice number ( |
|
| Lists customer disputes from the PayPal Sandbox Disputes API ( |
|
| Checks merchant eligibility for PayPal Sandbox Orders v2 |
|
| Lists configured PayPal Sandbox Webhooks ( |
|
| Lists all subscribed/available PayPal Sandbox Webhook Event Types ( |
|
| Lists merchant PayPal Invoicing v2 Templates ( |
Tier 2 — Proposal-Only (3 Tools)
Tool Name | Source | Description |
|
| Validates guardrails and issues a signed |
|
| Issues a signed |
|
| Validates refundable balance and issues a signed |
Tier 3 — Confirmed Financial Workflows, Official PayPal MCP Writes & REST-to-MCP Adapters (40 Tools)
Tool Name | Source | Description |
|
| Persists a new invoice using either a signed |
|
| Creates a real PayPal Sandbox Order ( |
|
| Captures an approved PayPal Sandbox Order ( |
|
| Executes a real server-side PayPal Sandbox card payment ( |
|
| Runs a complete isolated 7-step PayPal Sandbox card lifecycle test ( |
|
| Executes a PayPal Sandbox Refund ( |
|
| Voids an unpaid invoice ( |
|
| Evaluates a natural-language instruction with |
|
| Resets the caller's isolated |
|
| Creates a draft invoice in PayPal Invoicing v2 ( |
|
| Creates a draft recurring invoice series ( |
|
| Activates a draft recurring invoice series ( |
|
| Cancels an active recurring invoice series ( |
|
| Deletes a draft recurring invoice series ( |
|
| Sends a draft PayPal invoice to its recipient ( |
|
| Sends a reminder for a sent PayPal invoice ( |
|
| Cancels a sent PayPal invoice ( |
|
| Deletes a draft PayPal invoice ( |
|
| Initializes merchant automatic invoice reminder configurations ( |
|
| Updates an invoice auto-reminder configuration ( |
|
| Replaces a PayPal invoice or recurring series ( |
|
| Cancels automatic reminders on a sent PayPal invoice ( |
|
| Records an external payment on a PayPal invoice ( |
|
| Records an external refund on a PayPal invoice ( |
|
| Creates conditional payment rules on a PayPal invoice ( |
|
| Creates a PayPal Catalog Product ( |
|
| Patches a PayPal Catalog Product ( |
|
| Creates a PayPal Subscription Plan ( |
|
| Creates a PayPal Subscription ( |
|
| Cancels a PayPal Subscription ( |
|
| Patches a PayPal Subscription ( |
|
| Creates shipment tracking info ( |
|
| Updates shipment tracking info ( |
|
| Creates a PayPal Checkout Order ( |
|
| Captures an approved PayPal Checkout Order ( |
|
| Accepts liability for a PayPal Customer Dispute ( |
|
| Refunds a captured PayPal payment ( |
|
| Patches a PayPal Subscription Plan ( |
|
| Authorizes an |
|
| Creates a PayPal Payment Method Tokens v3 setup token ( |
Local Setup & Verification Suite
# 1. Install dependencies
npm install
# 2. Run Jest unit tests (SDK, Conversational Auth, Unified 82-Tool MCP Registry, PDF Receipts)
npm test -- --watchAll=false
# 3. Verify all 82 Unified MCP Tools (46 Official PayPal MCP + 14 REST Adapters + 21 Native) against live PayPal Sandbox
npm run verify:full-paypal-mcp
# 4. Run full 25-stage automated PayPal Sandbox, MCP, Card Lifecycle & Security verification
npm run verify:paypal-full
# 5. Verify all 82 Unified MCP Gateway tools against Cloudflare Worker + Supabase + Vercel
npm run verify:mcp
# 6. Verify Gemini 3.5 Flash-Lite AI, Proposal Security, Guardrails & Conversational Authorization
npm run verify:ai-security
# 7. Run Playwright E2E browser verification against live Vercel deployment
npm run verify:e2e
# 8. Run secret & project isolation scan
npm run scan:secretsSee docs/UNIFIED_MCP_AND_SECURITY_ARCHITECTURE.md for the complete architectural and security specification.
License
MIT License — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Pink Agentic AI Payments: AI agents pay within spending rules (budgets, caps, approval). Sandbox.
Invoicing tools for AI assistants: clients, draft invoices with computed tax, and email sending.
Trickl for AI assistants: full docs, setup plans, and sandbox tools to test purchases end to end.
Free invoice drafts, templates and direct PDF generation for AI agents. No account needed.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Python implementation that enables Large Language Models to interact with PayPal's APIs through function calling, supporting features like invoices, orders, products, subscriptions, and transactions.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI systems to interact with PayPal Braintree payment processing, allowing them to fetch transactions, create payments, and manage customer data via MCP tools.4-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to create PayPal invoices through a simple tool interface.-

@paypal/mcpofficial
AlicenseNot gradedqualityFmaintenanceEnables integration with PayPal APIs for managing invoices, payments, disputes, subscriptions, and more through natural language.742 npm13Apache 2.0








