cancelledStripeSubscriber
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
This val processes cancelled Stripe subscribers to Val Town Pro. It sends our team a Discord notification. It takes a couple of steps if you'd like to set up something similar for your own Stripe account.
- Fork this HTTP val
- Create a new webhook in Stripe
- Add your val's HTTP endpoint URL into the Stripe webhook
- Select
customer.subscription.cancelled
as the only event to listen to (more on this below) - Add your
stripe_sk_customer_readonly
to your Val Town Env Variables - Add your webhook's signing secret as
STRIPE_WEBHOOK_SECRET
to you Val Town Env Variables
- Verifies the signature to make sure it's really from Stripe
- Sends off the Discord message