7
8 Comments

Subscription Management - Best Practices

I am looking for some good practices on implementing subscriptions, plans etc. Subscription services like Chargee etc provide some blog posts, but ideally I do not want to be so deeply integrated with one service just in case I might need to move for some reason.

I wonder what I should keep in our database. For example should I keep the plans (name of plan, features included, expiration if any) in our own database or have the subscripton service handle that?

I am a newbie on this topic, so any feedback is welcome.

  1. 5

    I've used Stripe & Paddle.. here's my advice:

    Create plans in the payment gateway. Create the same plans in your SaaS app.
    Keep customer id, plan id, and subscription id in both locations.
    Allow subscribing/cancelling/resubscribing in your app. You'll need plan id, subscription id, customer id.

    Dates like trial end dates or billing period end dates (think cancelled subscription, but user is allowed to use up rest of period) should in my opinion not be kept in two places, your payment gateway is the master of this.

    Use your payment gateway webhooks so if it says something is up, your app can react: failed charges, expiring credit card, subscription will renew soon, successful charge, subscription cancelled after x failed payments.

  2. 3

    Following this because I'm interested to know what others are doing as well. Can't seem to find any solid articles on the topic. (Or I'm not searching the right thing)

  3. 2

    Hi pbaumer,

    I run a subscription billing software myself and I thought I can give you insights on this.

    The answer to your question will depend upon the payment gateway that you are willing to use.

    In the case of PayPal Standard: Subscriptions will be created at PayPal's end itself so, either way, you don't have to worry about anything.

    PayPal Payflow works differently and you will be locked with one billing service provider if you use that.

    In the case of Stripe: Keep the Stripe customer id in your database. So that you can trigger the customer id and bill that customer in future without any issues.

    1. 1

      Thank you. How about plans? I would need certain logic to handle upgrades/downgrades or addition/removal of users to company accounts. These actions could trigger new payments. I could implement all those in my saas app. But I guess this would be a great example of reinventing the wheel :)

  4. 1

    You can look how we implemented djaodjin-saas on read the docs (https://djaodjin-saas.readthedocs.io/en/latest/). The code is on GitHub. We have also implemented and documented deferred accounting (important for plans paid multiple periods in advance). Please let me know if you have any questions or comments. Always looking forward to improve.

    1. 1

      This is very interesting. I was hoping for the existence of an open source solution to be honest. I will check the docs.

  5. 1

    I make Windows desktop software. My customer information, expiry dates etc live in a licensing database which the apps connect to regularly.
    The payment gateways send information to the licensing gateway, I make an endpoint for each payment gateway.
    Once a customer starts with a payment gateway moving them to another is a non-trivial task but sending new customers to a new gateway or using multiples (including cash) is just another endpoint or manual entry for the licensing server.
    Work out what you can own and what you need to outsource, let go of the ownership of what you outsource.

  6. 1

    This comment was deleted 5 years ago.

Trending on Indie Hackers
Reaching $100k MRR Organically in 12 months 29 comments What you can learn from Marc Lou 20 comments Worst Hire - my lessons 11 comments How to Secure #1 on Product Hunt: DO’s and DON'Ts / Experience from PitchBob – AI Pitch Deck Generator & Founders Co-Pilot 10 comments Competing with a substitute? 📌 Here are 4 ad examples you can use [from TOP to BOTTOM of funnel] 9 comments 87.7% of entrepreneurs struggle with at least one mental health issue 8 comments