Payhip automation · runs weekly
Get a weekly Payhip sales summary with refunds and coupons
On Monday you open Analytics for the three graphs, then the Customers page to count refunds and work out which coupon codes sold. The Payhip phone app alerts you to each new order, but it does not tell you how this week compares with the last one.
Cotlet does it in your own Payhip account with get_sales_stats, list_orders, list_coupons and get_sales_report, called by your AI agent, an n8n workflow or a script.
Hosted · nothing to install or maintain
Official options
Can Payhip do this on its own?
Payhip has no API for sales, views or orders (checked 12 Oct 2026). The Analytics page and the Payhip mobile app show sales and new-order alerts, webhooks push each paid or refunded order as it happens, and the Sales Report tab holds monthly PDFs. We found no weekly digest in Payhip's help center that puts sales, refunds and coupon results side by side.
By hand
How you do it in Payhip today
- Open Analytics in the Payhip dashboard and read the Daily Views, Daily Sales and Sales Breakdown graphs for the week, all in UTC.
- Read the conversion rate on the same Analytics page: views, started checkout and completed checkout, free downloads included.
- Go to Customers, click Filter Orders and set the order status to refunded or partially refunded with the week as the order date.
- For coupon results, click Export on the Customers page and open the CSV: the Coupon Code column shows which orders used a code, while Marketing > Coupons only shows a use count per code.
- Copy the numbers into a spreadsheet and compare them with last week's row by hand, every Monday.
With an agent
How to get a weekly Payhip sales summary with refunds and coupons
Prompt
Summarize last week in Payhip against the week before: sales, views, best sellers, refunds and which coupon codes were used. - 01
Pin the week in UTC
Payhip reports analytics in UTC, so the agent sets Monday 00:00 to Sunday 23:59 UTC and says so when your local week starts earlier or later. It reads get_sales_stats for that week and again for the week before.
- 02
Compare, then point at the outliers
The report leads with the change in sales and views against the previous week, names the best-selling product, and lists days that had views but no sales, which usually point to a broken link or a paused promotion.
- 03
Count refunds on their own
list_orders with the refunded and partially_refunded statuses covers the same dates. The filter works on order date, so the agent says when a refund belongs to an order bought in an earlier week rather than mixing it into this one.
- 04
Tie sales to coupon codes
Completed orders are grouped by coupon_code, so each code gets an order count and revenue, not just the use counter Payhip shows. list_coupons adds the remaining uses and expiry, and codes close to their limit or expiring within 7 days are flagged.
- 05
Report, change nothing
The run is read only. At the start of a month it adds last month's fees, VAT and affiliate commission from get_sales_report, once Payhip has closed that month.
What you get back
Example data
Week 5 to 11 Oct 2026 (UTC): sales $120.00, up from $84.00 the week before.
Views 890 (previous week 760). Best day: Sunday 11 Oct, $48.00 from 203 views.
Best seller: Notion Budget Template, $72.00. Freelancer Contract Pack, $48.00.
Refunds: 1 order (ord_Q81pLs, $24.00), bought this week.
Coupons: LAUNCH25 on 3 orders, 47 uses left, expires 1 Nov.
Days with views and no sales: 6, 9 and 10 Oct. Other ways to ask
- Every Monday at 8:00, post last week's Payhip summary to my Slack channel #sales.
- Compare October so far with September and add September's fees and VAT from the monthly sales report.
- Which coupon codes brought sales in the last 30 days, and which ones expire this month?
- Only the Freelancer Contract Pack: daily sales and refunds for the past two weeks.
Before you automate it
What Payhip allows, and what to know first
- Payhip's Analytics page reports Daily Views, Daily Sales and Sales Breakdown in UTC, and views made while you are logged in to Payhip are not counted.
- Payhip's conversion rate counts a free download with a valid email as a completed checkout, so free products raise it.
- Refunds are issued in Stripe or PayPal, not in Payhip, and then show up in Payhip's analytics and monthly sales report.
- Payhip's monthly Sales Report under Customers > Sales Report is a PDF with EU and UK VAT, Stripe and PayPal fees, Payhip fees, custom taxes and affiliate commission, none of which the weekly graphs show.
Every tool here only reads, so it can run weekly from n8n, Make, Zapier or cron without waiting for your OK.
Sources: Payhip Help: Sales and Views · Payhip Help: Conversion Rate · Payhip Help: Sales Report · Payhip Help: How Do I Refund a Transaction?
REST
Call get_sales_stats from a script
curl
curl https://cotlet.dev/api/v1/payhip/get_sales_stats \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"2026-10-05","to":"2026-10-11"}' Example response
{
"daily_views": [
{
"date": "2026-10-05",
"views": 142
},
{
"date": "2026-10-06",
"views": 98
},
{
"date": "2026-10-07",
"views": 176
},
{
"date": "2026-10-08",
"views": 120
},
{
"date": "2026-10-09",
"views": 87
},
{
"date": "2026-10-10",
"views": 64
},
{
"date": "2026-10-11",
"views": 203
}
],
"daily_sales": [
{
"date": "2026-10-05",
"amount": "24.00"
},
{
"date": "2026-10-06",
"amount": "0.00"
},
{
"date": "2026-10-07",
"amount": "36.00"
},
{
"date": "2026-10-08",
"amount": "12.00"
},
{
"date": "2026-10-09",
"amount": "0.00"
},
{
"date": "2026-10-10",
"amount": "0.00"
},
{
"date": "2026-10-11",
"amount": "48.00"
}
],
"sales_by_product": [
{
"product_id": "RGsF",
"name": "Notion Budget Template",
"amount": "72.00"
},
{
"product_id": "mVT0",
"name": "Freelancer Contract Pack",
"amount": "48.00"
}
]
} MCP: add https://cotlet.dev/mcp/v1 with the same key; the tool is payhip_get_sales_stats. Example data.
Schedule it in n8n, Make, Zapier or cronTools
Payhip tools this automation uses
| Tool | Parameters |
|---|---|
| get_sales_stats | from, to |
| list_orders | email, order_id, product_id, status, shipping, from, to, limit, cursor |
| list_coupons | limit, cursor |
| get_sales_report | month |
Frequently asked questions
Does the summary include affiliate payouts?
Only as monthly totals: get_sales_report returns affiliate commission and affiliate sales for a closed month. Per-affiliate amounts and PayPal emails are in Payhip's Affiliate Sales Report under Marketing > Affiliates, and Payhip does not pay affiliates for you.
Give your agent access to Payhip.
Free 7-day trial with 5,000 credits, no card needed. Cotlet is independent and not affiliated with Payhip.