The Scenario
You've been logging Payhip subscription.deleted webhook payloads into a Google Sheet for six months — column B of the "Cancellations" tab, one JSON blob per row. It started as a precaution, something to have around if anyone ever asked. Nobody asked for five months. Then last Monday the founder pinged you in Slack: "Which plans are people actually canceling? I want to know before we redesign the pricing page."
You have six months of cancellation data. You have no idea which plans are churning the most because you've never parsed the raw payloads.
The bad version:
- Open the first row of column B, extract the plan name and cancellation date by reading the JSON.
- Write those two values somewhere — a new tab, a tally sheet, a running list in a text file.
- Work through all 200-plus rows this way, manually incrementing a count for each plan name as you go.
- Realize that some rows have different JSON structures because the webhook format changed at some point, and go back to check your counts.
You've been sitting on this data for six months. The fact that getting a simple churn breakdown from it requires a full afternoon of manual work is a failure mode, not a feature.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads every row of cancellation webhook data, extracts the plan name and cancellation date from each payload, and builds the breakdown you need — without you touching a single row of JSON.
Process each Payhip subscription.deleted event in column B, extract plan name and cancellation date, and create a churn-count-by-plan pivot in the "Churn Analysis" sheet.
What You Get
- A pivot table lands on the "Churn Analysis" sheet with one row per plan and total cancellation counts.
- Each month represented in the source data gets its own column so you can see whether churn is accelerating or leveling off.
- Rows with malformed JSON or missing plan fields are flagged separately, not silently excluded from the pivot.
What If the Data Is Not Quite Ready
The webhook format changed partway through — two different JSON structures in the same column
Parse the Payhip subscription.deleted events in column B of the "Cancellations" tab. Handle two possible JSON structures: one where the plan name is at "data.plan.name" and one where it's at "subscription.plan_id". Extract whichever field is present, note the schema version in a helper column, and produce a unified churn-count-by-plan pivot on "Churn Analysis".
You want churn counts filtered to only the last 90 days
Parse column B of the "Cancellations" tab for Payhip subscription.deleted events. Filter to only events where the cancellation date falls within the last 90 days. Pivot the results by plan name on the "Churn Analysis" sheet with a count column and a "% of total cancellations" column.
The plan slugs need to be mapped to display names before pivoting
Parse the Payhip subscription.deleted events in column B of "Cancellations". Map plan slugs to display names: "tier_starter" → "Starter", "tier_pro" → "Pro", "tier_enterprise" → "Enterprise". Pivot cancellation counts by display plan name and month on "Churn Analysis".
Full analysis in one prompt — parse, clean, pivot by plan and month, rank by churn rate, and flag the worst-performing plan
Parse all Payhip subscription.deleted events from column B of "Cancellations". Map slugs to display names. Pivot cancellation counts by plan and month on "Churn Analysis". Add a "Churn Rate" row if total subscriber counts by plan are available in a "Subscribers" tab. Sort plans by total cancellations descending and bold the highest-churn plan row.
Six months of raw cancellation data becomes a usable analysis in a single prompt.
Try It
Get the 7-day free trial of SheetXAI and open the sheet where your Payhip subscription.deleted webhook payloads are logged, then ask it to parse and pivot the churn data by plan. To see the other side of the same dataset, see Build a New Subscriber Report From Payhip Webhook Data in Google Sheets or return to the Payhip integration overview.
