6
5 Comments

Fastest & easiest SaaS subscription billing?

OK, I know IH is owned by Stripe, so I've been working on that, but to be honest I'm pretty lost.

I set up their Billing app (or plugin or whatever) and created some pricing plans. I've been looking at their documentation.

What I'm not exactly clear on is how best to manage account status. I'm using MongoDB Stitch for my 'backend'/database. Will I have to 'manually' update a user record in my own db whenever account status changes, or is it possible to always query Stripe directly?

In other words—I want to manage as little as possible by myself. Recurly is too expensive. I thought Stripe had something (even) more out of the box, but perhaps I was mistaken?

posted to Icon for group Money
Money
on December 3, 2019
  1. 2

    Hey tedbot,

    I believe you can do as much or as little as you want.
    The only thing you need is to correlate whatever user tier on your site with corresponding stripe statuses.

    You’re at a minimum going to program something to sync your site with stripe - whether it’s by a webhook or whatever. Because how else will your site know whether the payment has failed or whatever?

    Having said that, the only data you’d need to save on your side of really the customer ID because as you say, everything else can be queried.

    Gl!

  2. 1

    You've got a couple of options on how to keep your DB synced with Stripe.

    The first is simply to query a user and get back the details. Saving the ID stripe gives you back, and you'll be able to pull back the details on that user.

    You can also use Stripes webhooks. With these, stripe will send a message to your server at a specified endpoint with details on what changed. So, if a users payment fails for example, Stripe can send you a message with the details and you can update accordingly. This is my preferred method of handling these types of updates as it moves the process to the background and means I don't have to check every time a user logs in.

  3. 1

    How you set it up would depend on how you query the account status on the backend and/or what you do with it. For https://TripFate.com for example, I need to fetch the user information multiple times and having the account status cached/updated locally in the DB saves the additional overhead that I'd have if I were solely relying on making API calls to Stripe. I know that setting things up manually seems daunting, but the webhooks model is rather simple and allows you to do additional stuff when an event (successful payment, cancellation, etc.) occurs.

  4. 1

    You can setup their “Checkout” page/thing pretty easily from my test/experiment - it redirects to their hosted page and you can either reconcile sales manually in the stripe dashboard or implement a few webhooks that stripe will call when a payment succeeds or is renewed.

    I think some people on here offer stripe as a service as well so maybe do a quick search on IH and see if there are even more easy ways to get cracking!

    👍

    1. 1

      Aha—"Checkout" was what I was thinking of. OK, I might use that.

Trending on Indie Hackers
I wasted 6 months building a failed startup. Built TrendyRevenue to validate ideas in 10 seconds. User Avatar 50 comments Agencies charge $5,000 for a 60-second product demo video. I make mine for $0. Here's the exact workflow. User Avatar 38 comments Your files aren’t messy. They’re just stuck in the wrong system. User Avatar 27 comments Built a tool that finds which Reddit/HN threads are making ChatGPT recommend your competitors User Avatar 22 comments Why Direction Matters More Than Motivation in Exam Preparation User Avatar 14 comments A Closer Look at Droven .io Artificial Intelligence User Avatar 8 comments