What it does
Gumroad's dashboard shows sales as they come in and a chart by period, which is fine for a check and awkward for a weekly number you can compare: refunds land on a different day than the sale, and products blur together.
The agent pages through last week's sales from the Gumroad API, groups them by product, subtracts refunds and compares with the week before. Creators and small founders get one revenue number per week and the product behind any change, without opening the dashboard.
How it works
1Page through last week's sales
GET https://api.gumroad.com/v2/sales?after=<last Monday>&before=<this Monday>(dates asYYYY-MM-DD;afteris inclusive,beforeexclusive). Each page holds 10 sales; pass the returnedpage_keyuntil there is none.- 2
2Group by product
Sum
price(in cents) perproduct_nameand count the sales. Keep sales markedrefunded,partially_refundedorchargedbackapart. - 3
3Subtract refunds
Revenue after refunds is gross minus refunded amounts. Name each refund with its product and amount, and recheck the previous four weeks for sales refunded since; two refunds of one product in a week is worth a look at its page or file.
4Compare with the week before
Repeat the call for the previous Monday to Sunday and compare revenue, sales count and each product's share.
- 5
5Report
Revenue after refunds and the change, sales count, revenue by product, refunds, and the best day.
Post it to the board
With
BRIEFKIN_TOKENset, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
Install and run it
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
Install the skill
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shell
curl -fsSL https://briefkin.dev/skills/gumroad-weekly-sales/install | shRun it
Ask Claude Code:
prompt
Run the gumroad-weekly-sales skillOr paste the prompt instead of installing:
prompt
Using the Gumroad API v2 with my access token (read only), get all sales from last Monday to Sunday: GET /v2/sales with after=<Monday> and before=<next Monday>, following page_key until the last page. Sum price (cents) by product_name with sales counts, and list sales marked refunded, partially refunded or charged back separately. Do the same for the week before. Tell me revenue after refunds and its change, number of sales, revenue by product, each refund with product and amount, and the best day. Keep amounts in my currency.Put it on a schedule
Mondays at 8:00, from cron on any machine where Claude Code is signed in:
crontab
0 8 * * 1 claude -p "Run the gumroad-weekly-sales skill"Add it with
crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.Send it to your board
Connect Briefkin once with
curl -fsSL https://briefkin.dev/install | shand every run lands on your board as a stat tile. How setup works
View the SKILL.mdRaw file
SKILL.md---
name: gumroad-weekly-sales
description: "Every Monday: last week's Gumroad revenue after refunds against the week before, with sales by product and any refunds named. Use when the user asks for this, or when it runs on a schedule."
---
# Gumroad weekly sales
Every Monday: last week's Gumroad revenue after refunds against the week before, with sales by product and any refunds named.
Gumroad's dashboard shows sales as they come in and a chart by period, which is fine for a check and awkward for a weekly number you can compare: refunds land on a different day than the sale, and products blur together.
The agent pages through last week's sales from the Gumroad API, groups them by product, subtracts refunds and compares with the week before. Creators and small founders get one revenue number per week and the product behind any change, without opening the dashboard.
## Two ways to get the data
Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.
## Route A: API or MCP server
### What you need
- A Gumroad access token with the `view_sales` scope, created under Settings > Advanced > Applications, in `GUMROAD_ACCESS_TOKEN`.
- Read only: the skill never issues refunds or changes products.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **Page through last week's sales** (Gumroad): `GET https://api.gumroad.com/v2/sales?after=<last Monday>&before=<this Monday>` (dates as `YYYY-MM-DD`; `after` is inclusive, `before` exclusive). Each page holds 10 sales; pass the returned `page_key` until there is none.
2. **Group by product**: Sum `price` (in cents) per `product_name` and count the sales. Keep sales marked `refunded`, `partially_refunded` or `chargedback` apart.
3. **Subtract refunds**: Revenue after refunds is gross minus refunded amounts. Name each refund with its product and amount, and recheck the previous four weeks for sales refunded since; two refunds of one product in a week is worth a look at its page or file.
4. **Compare with the week before** (Gumroad): Repeat the call for the previous Monday to Sunday and compare revenue, sales count and each product's share.
5. **Report**: Revenue after refunds and the change, sales count, revenue by product, refunds, and the best day.
## Route B: the browser
### What you need
- Signed in to Gumroad as the creator (or a team member with the Marketing or Admin role, which can see sales). The person picks the currency the dashboard displays.
If something is missing, say what and stop; do not invent numbers.
### Steps
Start at https://app.gumroad.com/dashboard/sales. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.
1. **Set last week on the Sales analytics page**: This is **Analytics** > **Sales** in the sidebar. Set the date range to last Monday through Sunday and read the totals (sales, revenue) and the chart by day for the best day. The table below splits the week by product; copy sales count and revenue per product.
2. **Repeat for the week before**: Move the range back one week and read the same totals and per-product numbers. Analytics shows gross sales, so refunds come from the next step.
3. **List refunds**: Open **Sales** (the customers list at `https://app.gumroad.com/customers`) and use the filters to show purchases from the last five weeks that are refunded or charged back. Note product, amount and the date of the original purchase, and which week each refund belongs to.
4. **Report**: Revenue after refunds last week and the change against the week before, sales count, revenue by product, each refund with product and amount, the best day and one line on the product that moved. If the customers list is long, use **Export** and read the CSV.
Note: The analytics page counts a sale on its purchase date and does not subtract later refunds, so revenue after refunds needs both pages. Discounts and partial refunds appear only on the customers list.
## The report
- **Revenue after refunds** last week, with the change.
- **Sales** count, and revenue by product.
- **Refunds**: product and amount.
- **Best day** of the week.
- One line on the product that moved.
## Post it to Briefkin
When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.
```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
-H "authorization: Bearer $BRIEFKIN_TOKEN" \
-H "content-type: application/json" \
-d @- <<'JSON'
{
"v": 1,
"event_id": "gumroad-weekly-sales/<date of this run, e.g. 2026-10-16>",
"item_key": "gumroad-weekly-sales",
"project": "Acme Studio",
"source": "Gumroad weekly sales skill",
"kind": "metric",
"title": "$2,828 in Gumroad sales last week, up 9%",
"metric": {
"label": "Revenue after refunds, last week",
"value": 2828,
"prefix": "$",
"better": "higher",
"period_start": "<start of the period, ISO 8601>",
"period_end": "<end of the period, ISO 8601>"
},
"glance": [
{
"type": "Grid",
"props": {
"columns": 3
},
"children": [
{
"type": "Stat",
"props": {
"label": "Sales",
"value": 94
}
},
{
"type": "Stat",
"props": {
"label": "Refunds",
"value": 58,
"prefix": "$",
"better": "lower"
}
},
{
"type": "Stat",
"props": {
"label": "Top product",
"value": "Finance template"
}
}
]
}
],
"widget": [
{
"type": "Table",
"props": {
"columns": [
"Product",
"Sales",
"Revenue"
],
"align": [
"left",
"right",
"right"
],
"rows": [
[
"Notion finance template",
48,
"$1,392"
],
[
"Icon pack pro",
21,
"$819"
],
[
"Course: ship your side project",
5,
"$495"
],
[
"Lightroom presets",
20,
"$180"
],
[
"Refunds (2, finance template)",
"",
"-$58"
]
]
}
},
{
"type": "Callout",
"props": {
"text": "The finance template sold 48 copies, 15 more than the week before, most on Thursday after the newsletter mention.",
"tone": "ok"
}
}
],
"size": "md"
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).
## Run it on a schedule
Suggested: Mondays at 8:00 (`0 8 * * 1`). From cron, with the agent signed in on that machine:
```bash
0 8 * * 1 claude -p "Run the gumroad-weekly-sales skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```
Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/gumroad-weekly-sales#schedule
Source: https://briefkin.dev/skills/gumroad-weekly-sales
What your agent needs
A Gumroad access token with the
view_salesscope, created under Settings > Advanced > Applications, inGUMROAD_ACCESS_TOKEN.Read only: the skill never issues refunds or changes products.
Connecting Gumroad
- Gumroad MCP server, Gumroad's own hosted server. In Claude, add
https://gumroad.com/claude/v1/mcpas a custom connector (Gumroad isn't in Claude's directory yet) and sign in to Gumroad; other clients that support OAuth with PKCE can use the same URL. Its tools list products, sales and payouts, and can create, publish and unpublish product drafts (details). - API v2 with an access token. In Gumroad, open Settings > Advanced, create an application under Applications, and click Generate access token. Store the token in
GUMROAD_ACCESS_TOKENand pass it as theaccess_tokenparameter. An OAuth app can ask for just theview_salesscope.
If your client lets you choose OAuth scopes for the MCP server, keep view_sales and view_payouts and leave out edit_products unless you want drafts made from chat. Disconnecting in the chat app doesn't revoke the token: do that under Authorized Applications in Gumroad's settings.
Questions
Is this what Gumroad pays out?
No, it is revenue before Gumroad's fees and any taxes Gumroad collects on your behalf. Payouts arrive on Gumroad's schedule and include fees and adjustments; use the payouts page for what reaches your bank, and this report for how the week sold.
Why does a refund show up in a later week?
The sales list returns sales by the date of purchase and marks them refunded when that happens. A sale from two weeks ago refunded last week changes that older week, so the agent also rechecks the previous four weeks for new refunds and mentions any it finds.
Do I need Briefkin to use the Gumroad weekly sales skill?
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a stat tile, so you can glance at it instead of asking again.
Which agents can run it?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Can it work without an API or MCP server, from my browser?
Yes. Switch the data source to "Your browser" and the steps change to the Gumroad pages themselves: the agent opens app.gumroad.com/dashboard/sales in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.