Question

Is it good to sync Stripe and RevenueCat entitlements via Firebase extensions?

  • 1 June 2023
  • 1 reply
  • 123 views

Badge +2

I have an iOS app which uses the RevenueCat Swift SDK and an web app which uses Stripe. Both apps are powered by Firebase as the backend. I want to sync the subscriptions between them. 


I installed Firebase extensions for RevenueCat and Stripe. Both extensions set custom authentication claims in the user’s access token. Is that a good way to sync purchases?


Are there any other easy ways to sync the purchases? (by easy I mean little or zero backend work).

Another option I’m exploring is to setup a listener for user document in Firestore, which is updated by both the extensions (RevenueCat and Stripe). So when any changes happen to that document, I can update the subscription info in the apps. 

 

PS: Actually, having to write backend code to sync purchases between web and iOS makes me think the purpose of using RevenueCat is lost.


1 reply

Userlevel 6
Badge +8

Hey @imthath!

As long as you’re sending Stripe purchases to RevenueCat, RevenueCat will send all of a customer’s subscription status details to Firebase via our integration in the same format as other stores. You should be able to set up a listener on the relevant document in Firebase, but I’ve not personally had much experience with Firebase directly.

Maybe others can chime in on how they’ve done it! Alternatively, you could also use our API directly to check subscription status on the web: https://www.revenuecat.com/reference/subscribers

Reply