You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to properly resync the website with the latest Stripe products?
For example, if starting out using a localhost version, and then later deploying a website version - the products will be empty. I believe this is since only localhost version was running first, and products were created, so only localhost database got the webhook events. This means in website version, the products are empty since it never received the webhooks when products were created.
In a video tutorial, their solution is to archive existing Stripe products and recreate them again. I feel this is inefficient.
I was also wondering, lets say that the website went down, and you created or modified Stripe products. When the website is back up, won't the website be out of sync with Stripe since the webhook wasn't online?
Could there be a solution such as fetching all the Stripe products at build time, and also having a method to manually occur a resync with Stripe products if anything becomes out of sync?
Unless this is already possible and I'm missing it, please let me know.
The text was updated successfully, but these errors were encountered:
While in development I've personally just been modifying the product/price description to trigger a re-sync with my local DB. Really, the bigger concern is that if you're missing product upgrade webhook events, you're certainly going to be missing subscriptions, payments, and all that kind of business stuff.
I think if you're not confident your site will be running all the time, the 2 solutions I got working were:
Use a Supabase Edge Function to host a very lightweight webhook processing script. They even made a little tutorial for this https://supabase.com/docs/guides/functions/examples/stripe-webhooks
It worked well but ultimately there was more business logic I wanted to run in my webhook handler, and didn't like it silo'ed off in its own separate service. If all you want is to keep the database up to date, this is a great way to do it.
Ditch the stripe stuff out of your database, and the webhooks... use a data wrapper instead. This will let you query live data directly from Stripe as needed. https://supabase.com/partners/integrations/supabase_wrapper_stripe
In my experience this worked really seamlessly, though came at a noticeable cost to performance. It might have been improved since I tried it.
Is there a way to properly resync the website with the latest Stripe products?
For example, if starting out using a localhost version, and then later deploying a website version - the products will be empty. I believe this is since only localhost version was running first, and products were created, so only localhost database got the webhook events. This means in website version, the products are empty since it never received the webhooks when products were created.
In a video tutorial, their solution is to archive existing Stripe products and recreate them again. I feel this is inefficient.
I was also wondering, lets say that the website went down, and you created or modified Stripe products. When the website is back up, won't the website be out of sync with Stripe since the webhook wasn't online?
Could there be a solution such as fetching all the Stripe products at build time, and also having a method to manually occur a resync with Stripe products if anything becomes out of sync?
Unless this is already possible and I'm missing it, please let me know.
The text was updated successfully, but these errors were encountered: