• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
project logo

charmaine

stripeCancellationNotification

Get notifications for Stripe cancellations + reasons
Public
Like
1
stripeCancellationNotification
Home
Code
2
README.md
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
3
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
7/1/2025
Viewing readonly version of main branch: v160
View latest version
README.md

Stripe Cancellation Webhook

A webhook that monitors Stripe subscription cancellations and sends notifications to Discord.

Screenshot 2025-06-30 at 10.40.03 PM.png

Setup

1. Environment Variables

Set these environment variables:

  • stripe_subscriptions_readonly - Your Stripe secret key (starts with sk_)
  • STRIPE_WEBHOOK_SECRET - Webhook endpoint secret from Stripe dashboard
  • DISCORD_WEBHOOK_URL - Discord webhook URL for notifications

2. Stripe Webhook Configuration

  1. Go to your Stripe Dashboard → Webhooks
  2. Add a new webhook endpoint pointing to your Val Town HTTP endpoint URL
  3. Subscribe to the customer.subscription.updated event
  4. Copy the webhook signing secret to your environment variables

What it does

  • Sends Discord notification when a subscription is cancelled
  • Includes customer ID, subscription details, amount, and cancellation reason
  • Sends follow-up message with customer feedback if provided
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.