vercel / nextjs-subscription-payments

Clone, deploy, and fully customize a SaaS subscription application with Next.js.
https://subscription-payments.vercel.app/
MIT License
6.38k stars 1.3k forks source link

Switch to Foreign Data Wrapper (FDW) #148

Open throwaway34241 opened 1 year ago

throwaway34241 commented 1 year ago

I just read about Supabase's new Foreign Data Wrappers here, and in particular, there's one for Stripe: https://github.com/supabase/wrappers/tree/main/wrappers/src/fdw/stripe_fdw

As far as I understand, it means that we could swtich the following tables to foreign in schema.sql: customers, products, prices, subscriptions etc, since they can be queried via the FDW. And we can delete all webhooks!

Is it worth migrating this repo to use the Stripe FDW?

thorwebdev commented 1 year ago

Yes, once ready we'll take a look at that.

mworks-proj commented 1 year ago

any news on this?

nleroy917 commented 1 month ago

I'm really curious about this too.

There is a post on the superbase subreddit that seems to argue for webhooks: https://www.reddit.com/r/Supabase/comments/17k1jk1/stripe_webhooks_v_supabasewrappers/

Here is a post in the supabase discord that also argues for webhook: https://discord.com/channels/839993398554656828/1167917737796968538

So is it really advantageous to switch to Stripe FDWs? Is network speed really that big an issue?