nextjs-subscription-payments
nextjs-subscription-payments copied to clipboard
Issue with keeping website products in sync with Stripe products?
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.