Skip to main content
Glama
README.md
# How to connect Payhip to Claude Code, ChatGPT and any AI agent

Read Payhip orders, products and sales reports through MCP or REST. Connect your seller account to agents, automation workflows or scripts.

## What you can ask

> Fix the download limit error for the buyer and resend the download links.

> Prepare a weekly sales summary for my Payhip store.

> Create a coupon for the launch.

## Connect in 2 minutes

Get your API key at https://cotlet.dev/app and export it as `COTLET_API_KEY`.

### Claude Code

```bash
claude mcp add --transport http cotlet https://cotlet.dev/mcp/v1 --header "Authorization: Bearer $COTLET_API_KEY"
```

### ChatGPT

Settings → Apps → add connector URL `https://cotlet.dev/mcp/v1`, then sign in with Cotlet.dev. No API key needed.

### Cursor

Copy `.cursor/mcp.json` from this repo into your project:

```json
{
  "mcpServers": {
    "cotlet": {
      "url": "https://cotlet.dev/mcp/v1",
      "headers": {
        "Authorization": "Bearer ${COTLET_API_KEY}"
      }
    }
  }
}
```

## Run it locally (stdio)

This repo is a real MCP server. It speaks MCP over stdio, lists its Payhip tools without any key, and forwards every tool call to the hosted Cotlet.dev server. The hosted URL above stays the recommended way. Use this when your client only starts local servers.

```json
{"mcpServers":{"payhip":{"command":"uvx","args":["payhip-mcp"],"env":{"COTLET_API_KEY":"your-key"}}}}
```

Or with Docker:

```bash
docker build -t payhip-mcp .
docker run -i --rm -e COTLET_API_KEY payhip-mcp
```

Tools: `payhip_guide`, `payhip_status`, `payhip_open`, `payhip_read`, `payhip_click`, `payhip_type`, `payhip_close`. Without `COTLET_API_KEY` a tool call answers: "Set COTLET_API_KEY. Get a key at https://cotlet.dev/app".

## Command line

Python 3.10+, nothing else to install. From PyPI:

```bash
pip install payhip-mcp        # or run it once: uvx payhip-mcp connect
payhip-mcp connect
```

Or straight from this repo:

```bash
export COTLET_API_KEY="your-key"
python3 payhip_agent.py connect   # ready config for Claude Code, Cursor, ChatGPT
python3 payhip_agent.py status    # is Payhip ready in your Cotlet.dev account
python3 payhip_agent.py guide     # Payhip screens and sign-in link
python3 payhip_agent.py read      # open Payhip, read the page, close the browser
python3 payhip_agent.py tools     # list Cotlet.dev tools
python3 payhip_agent.py serve     # start the stdio MCP server (same as no argument)
```

## Questions from Payhip users

**Can I use the Payhip API without an AI agent?**

Yes. Call Cotlet's REST API from a script or an HTTP step in n8n, Make or Zapier with your Cotlet key. MCP is the alternative for AI agents; you do not need to connect an agent to use REST.

**How do I get access?**

Create a free account at https://cotlet.dev, open Payhip under Integrations in the console and log in to Payhip in its Cloud Browser. The trial starts when you sign up, no card asked.

**How do I connect Payhip to ChatGPT or Claude?**

Sign up at cotlet.dev, log in to Payhip once in its Cloud Browser and add Cotlet to ChatGPT or Claude, following the steps in your console. No API key is needed. ChatGPT and Claude then work in your Payhip account through Cotlet, in their phone apps too.

**What can ChatGPT do in Payhip?**

With Cotlet, ChatGPT, Claude and other AI agents handle jobs like these in Payhip: fix download limit errors and resend download links; weekly sales summary; create a coupon for a launch. You ask in plain words, and anything that reaches other people waits for your OK first.

**Do I need a paid Payhip plan?**

Payhip lists the same features on Free Forever, Plus and Pro, with no feature-gating, and the plans differ in transaction fee (5%, 2% and none) (checked 11 Oct 2026). A free store works.

**Do the order tools work on a store with no orders?**

The tools are built, but they need an order to act on. Payhip only sells once the seller has connected PayPal or Stripe, and Cotlet never connects one for you. On a new store list_orders returns an empty list, and get_order, add_order_note, resend_receipt, reset_download_credits and block_customer have nothing to open. The same holds for the rows of list_subscribers (Stripe needed), list_affiliates, list_customers and get_sales_report. Products, coupons, followers and sales stats work from the first day.

**What can it not do yet?**

Cancel a subscription, refund an order (refunds are made in PayPal or Stripe), create courses, coaching, memberships or physical products, edit products with variants, archive or delete a product, unblock a buyer, manage collections, shipping or license keys, and read the location map of Analytics. Order lists show the newest 25 orders at most, and list_customers groups only those.

**How does create_product send the file?**

The file goes in the call itself, up to 25 MB, and Cotlet uploads it to Payhip as Add Product does. The product starts invisible; update_product with visibility visible publishes it.

**Which time zone do dates use?**

Your store's time zone, set under Account > Settings. get_sales_stats days follow it, and order and coupon dates are plain dates (YYYY-MM-DD).

**Does add_order_note keep my old note?**

No. An order has one note, so the new text replaces it. Read the note with get_order first to add to it.

**Does Payhip have webhooks?**

Yes, 4: paid, refunded, subscription.created and subscription.deleted, set under Settings > Developer. They report events as they happen. To look back at older orders, an agent calls list_orders instead.

**Can the agent manage license keys?**

Not through Cotlet. Payhip's own API verifies, enables and disables license keys, and Pipedream wraps those calls for agents.

**Can the agent refund a buyer?**

No. Payhip refunds go through your Stripe or PayPal account, and no Cotlet tool touches either. The agent can find refunded orders and leave them alone.

**Is the MCP server different from the REST API?**

Only the entry point differs. Both carry the same 20 tools, inputs and answers, with one API key and one price. Agents use MCP; scripts and HTTP steps use REST.

**Is Cotlet affiliated with Payhip?**

No. Cotlet is independent and not affiliated with Payhip Limited.

## Find it on

- [Payhip on Cotlet.dev](https://cotlet.dev/integrations/payhip-api-mcp-server?utm_source=github&utm_medium=readme&utm_campaign=payhip&utm_content=find)
- [PyPI package payhip-mcp](https://pypi.org/project/payhip-mcp/)
- [Odel](https://odel.app/modules/cotlet/payhip)
- [mcpbeat](https://mcpbeat.com/mcp-servers/cotlet/payhip/)
- [Step-by-step guide (PDF) on Internet Archive](https://archive.org/details/cotlet-connect-payhip-to-ai-agents-guide)

## Also works with


- [All apps connected through Cotlet.dev](https://github.com/cotlet-connect)

---

More: https://cotlet.dev/integrations/payhip-api-mcp-server?utm_source=github&utm_medium=readme&utm_campaign=payhip

Start free: https://cotlet.dev/signup?app=payhip&utm_source=github&utm_medium=readme&utm_campaign=payhip

TDQS

A3.7/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct role: guidance, readiness check, browser lifecycle, page reading, clicking, typing, and closing. The only mild overlap is between the guide and status tools, but their descriptions make the boundary clear.

Naming Consistency4/5

All tools use the consistent payhip_ prefix and snake_case, which is predictable. However, guide and status are noun-like names while the others are verbs, a minor deviation from a pure verb_noun pattern.

Tool Count5/5

Seven tools is well-scoped for a browser automation server targeting Payhip. Each tool corresponds to a necessary phase of the workflow without redundant operations.

Completeness4/5

The core browser automation lifecycle is covered: onboarding, opening, reading, clicking, typing, and closing. Minor gaps exist around explicit navigation, scrolling, or selecting dropdowns, but most Payhip workflows can be handled with the provided tools.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues