startup-boilerplate
startup-boilerplate copied to clipboard
delete stripe customer when account is deleted
Add feature to delete the stripe customer when account is deleted through the on_user_modify webhook. Main reason is because let's say if a user deletes an account, we want to cancel all their subscriptions as well and keep the stripe db clean.
- Find stripe customer id based on supabase id
- https://docs.stripe.com/api/customers/delete