Public
Like
1
stripeCancellationNotification
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.
main.tsx
https://charmaine--6fa676e655b811f091e5f69ea79377d9.web.val.run
A webhook that monitors Stripe subscription cancellations and sends notifications to Discord.
Set these environment variables:
stripe_subscriptions_readonly
- Your Stripe secret key (starts withsk_
)STRIPE_WEBHOOK_SECRET
- Webhook endpoint secret from Stripe dashboardDISCORD_WEBHOOK_URL
- Discord webhook URL for notifications
- Go to your Stripe Dashboard → Webhooks
- Add a new webhook endpoint pointing to your Val Town HTTP endpoint URL
- Subscribe to the
customer.subscription.updated
,customer.subscription.updated
,customer.updated event
- Copy the webhook signing secret to your environment variables
- 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