Log Stripe subscription cancellations to Amplitude and a churn sheet
The moment a Stripe subscription cancels, record a churn event in Amplitude and add a row to your finance and CS churn tracker sheet.
Whenever a Stripe subscription is canceled, I want to ingest a matching churn event into Amplitude and log the cancel to a churn tracker Google Sheet. Every step is deterministic and no LLM reasoning is needed.
Trigger: a Stripe webhook on the customer.subscription.deleted event. When Stripe fires the webhook, read the payload and pull the subscription's customer email, plan name (or price nickname), MRR (in the smallest currency unit converted to a number), the subscription start date, and the cancellation reason from cancellation_details.reason (falling back to canceled_at or an empty string when it is missing). Also capture the Stripe event id and the canceled_at timestamp.
Step 1: call Amplitude's Send Events (HTTP V2) operation to record a single event. Use the customer email as user_id, event_type set to a configurable event name that defaults to "Subscription Canceled", the canceled_at time as the event time, and event_properties containing plan, mrr, start_date, cancellation_reason, and stripe_subscription_id. Use the Stripe event id as insert_id so retries dedupe safely on Amplitude's (device_id, event_type, time, insert_id) key.
Step 2: call Amplitude's Identify (Update User Properties) operation for the same user_id, setting is_churned=true, churned_at=canceled_at (ISO 8601), churn_mrr=MRR, and last_plan=plan. This is a user-property update only, not a second event.
Step 3: call Google Sheets Append Values on a configurable Sheet ID and tab (default "Churn Log"), appending one row in this column order: customer email, plan, MRR, tenure in days (canceled_at minus start_date, rounded down), cancellation reason, and ISO 8601 timestamp. Use valueInputOption USER_ENTERED so the timestamp and numbers are parsed correctly.
Expose two knobs on the prompt page: the Amplitude event name (default "Subscription Canceled") and the Google Sheet spreadsheet ID plus tab name. Respect Amplitude data residency when configured. If the webhook payload lacks an email, skip the row and the event rather than sending a blank user_id.
What does this prompt do?
- Listens for subscription cancellations in Stripe and captures each one the moment it happens.
- Records a Subscription Canceled event in Amplitude so churn shows up on your funnels and retention charts alongside product usage.
- Marks the customer's Amplitude profile as churned with the timestamp, lost MRR, and last plan so cohorts pick them up automatically.
- Appends a row to your Churn Log Google Sheet with the customer, plan, MRR, tenure in days, cancellation reason, and timestamp for finance and CS.
What do I need to use this?
- A Stripe account with permission to configure webhooks
- An Amplitude project on the US or EU data center
- A Google account with edit access to the Churn Log spreadsheet
How can I customize it?
- Choose the Google Sheet and tab where cancellations get logged
- Rename the Amplitude event and user property names to match your team's taxonomy
- Filter to specific plans or price IDs if you only want to log certain subscription tiers
FAQs
Why bother sending Stripe cancellations into Amplitude when Amplitude already tracks usage?
What happens if Stripe retries the webhook or fires it twice?
Does this capture cancellations from Stripe's dunning flow too?
Will this work if my Amplitude project is on the EU data center?
Can I change what columns get written to the churn sheet?
Related templates
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.
Keep a spreadsheet of your most important senders, and every email from one gets labeled, posted to your team channel, and logged automatically.
The moment an order is fulfilled, we register it with Yotpo so the review request is timed off real delivery, and we log every sync so failures never go unnoticed.
Every night at 11pm we compare the day's Shopify orders with your Zoho Books invoices and payments, and flag only what does not match.
Stop guessing why your Amplitude churn charts look wrong.
Bridge Stripe's server-side cancellations into your product analytics and finance log so every team sees the same story.