# Payfunnels MCP

> Payfunnels MCP Server connects your AI agent directly to your billing system. It lets you handle complex payments, manage recurring subscriptions, create one-time links, and process refunds—all through natural language conversation. Use it when you need full control over your revenue streams without ever leaving your chat interface.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** payment-links, subscriptions, checkout-funnels, recurring-billing, upsells

## Description

**Payfunnels MCP Server: Total Billing Control Through Conversation**

Forget logging into a dashboard just to move money or check accounts. This server hooks your AI agent straight into Payfunnels, letting you handle every payment, subscription change, and refund request using nothing but natural language talk. You get full command over your revenue streams without ever leaving your chat interface.

### **Managing Subscriptions**
You can keep tabs on every client's billing status. Use `list_subscriptions` to grab an overview of all active accounts right now. If you need the nitty-gritty details about a specific plan or user, call `get_subscription_details`. To cut ties completely, you execute `cancel_subscription`, which stops any recurring payments for a user account.

### **Auditing Financial Records**
Keeping track of cash flow is critical. You can pull comprehensive records using `list_payments` to see every single transaction that's gone through the system. For initial charges, you check out `list_setup_fees`, while service-related costs show up when you use `list_service_fees`. Want to dig into one specific payment? `get_payment_details` pulls all the data for a given transaction ID. You can also retrieve basic information about the person who's logged in right now using `get_current_user`.

### **Processing Payments and Refunds**
When you need money, there are three ways to get it. For immediate, one-off payments that don’t repeat, you generate a unique URL with `create_one_time_payment_link`. If you're setting up an account or service requiring an upfront fee, use `create_setup_fee` to generate the specific link for initial charges. To set up continuous revenue, call `create_recurring_payment_link`; that builds a subscription payment URL that automatically bills the client on a schedule.

To fix things—or take back money—you run `refund_payment`. This tool processes and records a refund against any specific transaction ID you give it. It's direct, fast, and gets the record updated immediately.

## Tools

### cancel_subscription
Stops an existing recurring subscription for a user account.

### create_one_time_payment_link
Generates a unique payment URL for a single, non-recurring amount and title.

### create_recurring_payment_link
Creates a subscription payment link that automatically bills the client on a schedule.

### create_setup_fee
Generates a new, specific fee link for initial setup charges.

### get_current_user
Retrieves the profile details of the currently logged-in user in Payfunnels.

### get_payment_details
Pulls all recorded data for a specific, single payment transaction ID.

### get_subscription_details
Gets detailed metadata about one specific recurring subscription plan or user account.

### list_payments
Returns a list containing details for all payments processed through the system.

### list_service_fees
Lists records of various service-related charges applied to accounts.

### list_setup_fees
Retrieves a comprehensive list of all initial setup fees ever created.

### list_subscriptions
Returns an overview of every active subscription currently managed by Payfunnels.

### refund_payment
Processes and records a refund against a specific payment transaction ID.

## Prompt Examples

**Prompt:** 
```
Create a one-time payment link for $50 labeled 'Setup Fee'.
```

**Response:** 
```
I've generated your payment link for the 'Setup Fee' ($50.00). You can share this URL with your customer: [link]. Would you like me to track when this is paid?
```

**Prompt:** 
```
Show me all payment funnels and their conversion rates for the current month.
```

**Response:** 
```
You have 5 active payment funnels this month. "Premium Upgrade" converts at 34% with $47,200 in revenue (412 checkouts started, 140 completed). "Annual Plan Offer" converts at 28% generating $89,100. "Addon Upsell" has the highest rate at 52% but lower volume ($12,400). Total funnel revenue: $178,300 across 892 successful transactions.
```

**Prompt:** 
```
Get the detailed transaction history and refund status for funnel Premium Upgrade.
```

**Response:** 
```
"Premium Upgrade" funnel details: 412 checkouts initiated, 140 completed (34% conversion), 272 abandoned. Revenue: $47,200. Refunds: 3 processed totaling $1,011 (2.1% refund rate). Average order value: $337. Payment methods: Credit Card 78%, PayPal 18%, Apple Pay 4%. Peak conversion hour: 2 PM EST.
```

## Capabilities

### Manage Subscriptions
List all active subscriptions (`list_subscriptions`), retrieve details on a specific plan (`get_subscription_details`), or cancel a recurring payment entirely using `cancel_subscription`.

### Process Payments & Refunds
Generate unique one-time links for immediate payments, create setup fees, and issue refunds against any recorded transaction via the `refund_payment` tool.

### Audit Billing Records
Pull comprehensive lists of all processed transactions (`list_payments`), service charges (`list_service_fees`), or initial setup fees (`list_setup_fees`) to maintain a clear financial overview.

## Use Cases

### The Client Needs a Quick Refund
A client complains about an overcharged service fee. Instead of emailing support and waiting, the agent prompts: 'Refund $75 for transaction ID 42.' The server immediately runs `refund_payment`, confirms the amount, and updates the ledger.

### Quarterly Billing Review
The finance manager needs to prepare Q3 reports. They ask the agent to 'List all payments and all active subscriptions.' The server calls both `list_payments` and `list_subscriptions`, giving a single, unified view of current revenue streams.

### Onboarding a New Customer
A sales rep needs to charge the new client an initial $200 setup fee plus a monthly subscription. They prompt: 'Create a setup fee for $200 and a recurring link for $99.' The agent executes `create_setup_fee` then `create_recurring_payment_link`, completing the process.

### Checking Account Health
The support team member needs to know if a client's payment issue is related to their plan or an old transaction. They run 'Get details for subscription X and list payments for user Y.' Using `get_subscription_details` and `list_payments` isolates the exact problem source.

## Benefits

- Auditability: You never have to guess where payment data lives. Use `list_payments` and `get_payment_details` to pull a full history of any transaction instantly, regardless of when it occurred.
- Subscription Control: Manage the entire lifecycle in one chat window. Check status with `list_subscriptions`, modify details using `get_subscription_details`, or cancel outright with `cancel_subscription`.
- Payment Generation: Need to close a deal fast? Use `create_one_time_payment_link` for immediate sales, or `create_recurring_payment_link` if it's an ongoing service.
- Refund Management: Process refunds without friction. Give your agent the ID and call `refund_payment`. It handles the transaction record update immediately.
- Setup Fee Tracking: Separate initial charges from recurring billing. Use `list_setup_fees` to keep track of those crucial first-time setup costs.

## How It Works

The bottom line is: Your AI acts as a dedicated billing coordinator that runs specific API calls when prompted, eliminating manual dashboard steps.

1. First, subscribe to the Payfunnels server and grab your API Key from your dashboard integration settings.
2. Next, input that external API key into your preferred AI client (like Claude or Cursor).
3. Finally, you tell your agent what you need—for example, 'Refund $50 for transaction ID 123'—and the agent executes the necessary tool call.

## Frequently Asked Questions

**How do I use the refund_payment tool?**
You tell your agent to run `refund_payment` and provide the specific transaction ID. The server verifies that ID against its records, then executes the refund command.

**What's the difference between create_one_time_payment_link and create_recurring_payment_link?**
Use `create_one_time_payment_link` for a single payment (e.g., $50 consultation fee). Use `create_recurring_payment_link` when the client is paying you every month or quarter.

**Can I see all my payments with list_payments?**
Yes, calling `list_payments` gives you a full record of everything processed. It’s your main log for tracking revenue across the platform.

**Which tool should I use to check if a client's subscription is active?**
Run `get_subscription_details`. This provides detailed metadata on one specific plan, which tells you exactly where they stand in their billing cycle.

**How do I verify my account identity and scope using the get_current_user tool?**
It immediately pulls your authenticated profile data. You'll see key identifiers like your unique client ID, organization name, and current API rate limit status for context.

**What specific payment details can I retrieve about a single charge using get_payment_details?**
You get granular info on one transaction: the exact amount, payment method type (e.g., Credit Card), completion timestamp, and whether it was flagged as a refund or an original payment.

**If I need to adjust our pricing structure, how do I manage fee templates using list_setup_fees?**
This tool lists all defined setup fees before they are used. You can review the name and associated amounts for each template, ensuring your agent uses the correct charge when creating new payment links.

**When I use get_subscription_details, what information helps me predict renewal dates or identify billing issues?**
The details return the next expected billing date and the status of the last charge. This lets your agent tell you if the account is in good standing or if a payment failure occurred.

**Can my AI automatically find the details for a specific payment by its ID?**
Yes! Use the `get_payment` tool with the Payment ID. Your agent will respond with complete metadata, including amount, status, customer info, and transaction date in seconds.

**How do I find my Payfunnels External API Key?**
Log in to your Payfunnels dashboard, navigate to **Billing** > **Integration**, find the 'Payfunnels API Key' section, and click 'Generate' to see your unique secret key.

**Can I process a partial refund via the AI?**
The current `refund_payment` tool processes the full transaction amount. For partial refunds, we recommend using the main Payfunnels dashboard until support is added to the API.