Readme

Cancelled Stripe Subscription Handler

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.

Setup

  1. Fork this HTTP val
  2. Create a new webhook in Stripe
  3. Add your val's HTTP endpoint URL into the Stripe webhook
  4. Select customer.subscription.cancelled as the only event to listen to (more on this below)
  5. Add your stripe_sk_customer_readonly to your Val Town Env Variables
  6. Add your webhook's signing secret as STRIPE_WEBHOOK_SECRET to you Val Town Env Variables

How the code is structured

  1. Verifies the signature to make sure it's really from Stripe
  2. Sends off the Discord message
Code
HTTP
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!