1
4 Comments

Help with technical implemention - Billing within Billing

I want to create a niche subscription platform. Does anyone know how to do this technically?

It's basically billing within billing. I would be charging my users but they would need to charge their customers. Any thoughts?

Do I just create a place where they have to put in their own stripe data? That sort of thing?

on April 1, 2021
  1. 2

    You can set this up easily with Stripe Connect.

    1. Your customers connect their Stripe account and accept payments
    2. You take a comission
    1. 1

      I didn't actually think about commission based pricing. Instead of my users paying a flat fee, I can take a percentage. Lower risk for users. More money for me if they break a certain amount of customers.

  2. 1

    Pretty much yeah. There is the concept of "marketplace payments" (called different things by different platforms) where you take a cut of your customers transactions so payments are shared but that doesn't sound like your use case.

    Typically secrets like Stripe keys are stored in environment variables for security but you will struggle to do that as your customers will be providing their details in flight.

    There's been a discussion around this on IH with no real conclusion. My take is store the keys in a database that is encrypted at rest and don't display them in plain site on your customers admin panel.

    Hope that helps.

    1. 1

      On a side note to the main question / point

      It can be risky to roll your own secrets manager, there are a lot of things you can get wrong. Especially if the secrets are stored in the same database as the rest of your application data.

      Another option is to use a secret store already created by someone else.

      Some examples are:

      There is still a large attack vector with how you authenticate with one of these services. Although the risk is generally a lot lower as long as you follow the best practice for the service you pick.