RevenueCat/firestore-revenuecat-purchases

Is it feasible for me to modify this code to write to a postgres db?

timothygorer opened this issue · 3 comments

I've got a postgres db hosted in the cloud, and I'd like to modify this revenuecat/firestore codebase to write to postgres instead of firestore. I was then going to host the modified codebase on Firebase Cloud Functions (that's how it's done already when you install the extension, from my understanding). Any thoughts would be highly appreciated.

One other side question: how does one set up stripe payments to get consumed by this extension? My understanding: user makes a purchase on my site via stripe, which fires a revenuecat webhook off that stores the data in revenuecat. This then fires the revenuecat/firestore codebase correct? I think I'm missing something.

Re Postgres: you could do that, but honestly you could then just listen to the regular RevenueCat webhooks and upon receiving webhooks, pull information from the RevenueCat REST API to store that in Postgres.

Re Stripe: You will need to send your Stripe tokens to the RevenueCat REST API. Then, everything will work as you outlined.

Gotcha @jefago very helpful response

Seems like we can close this @timothygorer ,

Feel free to reach out if that's not the case!