• Townie
    AI
  • 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
/
Code
/
Search
main.tsx
https://charmaine--6fa676e655b811f091e5f69ea79377d9.web.val.run
README.md

Stripe Cancellation Webhook

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

Screenshot 2025-07-02 at 4.56.28 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, customer.subscription.updated, customer.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 email, subscription details, amount, and cancellation reason
  • Sends follow-up message with customer feedback if provided
HTTP
  • main.tsx
    charmaine--6f…d9.web.val.run
Code
README.md
H
main.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.