Help with Stripe wrapper on Supabase!

How do I set up a simple subscribe and cancel button using Stripe?

I'n running a front-end only React app with Supabase as my backend-as-a-service. Here are my steps:
  1. When I register a user using Supabase, I also create a new Stripe customerID from that email and store the relationship between my userID and customerID - however, I'm worried that the subscriber will need to use the same email on the credit card - is this true or not?
  2. I use a redirectToCheckout button since I'm front-end only
  3. I use the Stripe wrapper on Supabase (which updates real time). If the user successfully subscribes, their customerID is recorded in the Supabase database (which I can check for a subscription)
  4. I can't find a cancel equivalent of redirectToCheckout so far - please help
    If I'm doing this wrong, can someone please help! Thank you so much
Was this page helpful?