5 ms·
For a subscription based Chrome extension (https://www.checkbot.io/ https://www.checkbot.io/), I use Firestore, Firebase and Cloud Functions to handle subscript
by seanwilson 8y ago
For a subscription based Chrome extension (https://www.checkbot.io/ https://www.checkbot.io/), I use Firestore, Firebase and Cloud Functions to handle subscription activation and login/authentication. I use Paddle for payments which fires a web hook to a Cloud Function when a purchase is made.
Works great so far for no cost and it hasn't required a single bug fix or any maintenance since launch. Firestore definitely has a lot of surprising caveats though and you need to design your app and data around this to avoid trouble later.
Does anyone have any stories to share about when they outgrew Firestore, what they migrated to and how? I wouldn't be keen to use NoSQL if my data became more complex.
- sambroner 8y agoInteresting model, do you have an OSS example of something like that?
- seanwilson 8y agoI couldn't find one for Paddle to use but I'm sure I saw a few for Stripe. I wanted to use Paddle because they do EU VAT for you. I could be tempted to open source it though. The gist of it is when a subscription is purchased a web hook triggers a Firebase Cloud Function that stores the subscription data (i.e. email address + subscription expiry date) in Firestore then when someone logs in via Firebase authentication you check if the email address is linked to a valid subscription. When the next payment is made to the subscription, you bump up the subscription expiry date. I've found there's little that can go wrong once it's up and running.
- xpaulbettsx 8y agoI'd personally be super interested in that code, even if it wasn't usable out of the box (i.e. just dump what you have)
- jd20 8y agoWould also love to hear more about how this is done... I'm in the process of setting up Stripe subscriptions on a website, but have been scratching my head over the best way to accomplish everything without setting up my own back-end server.
- rattray 8y agoI'm an engineer at Stripe and thinking about this problem - drop me an email? In profile. Would love to run a few ideas past you (or others frustrated by this).
- IanCal 8y agoThat's really useful, thanks. As is the pointer to paddle, I think they may have been missing some features last time I checked them (some time ago, or I just missed it) but that was a long time ago and they seem to have everything covered now. Fantastic! Saves some code I've been putting off writing.
- navs 8y agoPaddle's pricing seems a bit high at 5% + $0.5. Is there a reason why you opted to use Paddle over Stripe? Curious because I'm similarly working on a Firebase MVP at the moment and looking to integrate a donation feature. EDIT: nvm, you answered the Stripe vs Paddle question in another reply.
- seanwilson 8y agoIt does seem high but even doing tax returns is annoying enough so I've no desire to get involved with EU VAT and tax issues selling to other countries. This way I can set up payment and it runs itself which is worth the cost and Firebase means I don't have to think about DevOps too. Gumroad is another payment option to consider.
- irq-1 8y agoInteresting: > Stripe does not calculate any tax information for you. Paddle: > We automatically handle the calculation, collection and remittance of taxes in every single country on your behalf: you don’t need to do anything.