nextjs-subscription-payments icon indicating copy to clipboard operation
nextjs-subscription-payments copied to clipboard

Issue with keeping website products in sync with Stripe products?

Open KamilTheDev opened this issue 1 year ago • 0 comments

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.

KamilTheDev avatar Oct 02 '24 04:10 KamilTheDev