
How do you implement subscription payment in SaaS? - stealthmodeclan
I&#x27;ve never seen a clean way to implement subscription in a SaaS product. Most apps use glue script + stripe.<p>How do you do it?
======
dangrossman
Have a subscriptions table with a paid_through date column, a payments table
for records, and a daily script that selects rows with a paid_through less
than or equal to the current date, and makes a charge for those subscriptions.
That script implements all the pricing plans, coupons, discounts, dunning
mails, etc. I've done that for a half dozen businesses, with millions of
dollars in revenue. Is this the "glue script" that isn't clean enough? It
doesn't matter what payment gateway/service you use so long as they've got an
API for you to store and charge cards; I prefer Spreedly as a wrapper that
lets you change payment providers at will.

~~~
jurgenwerk
I second this. Just do it yourself with a cron job. It can be really simple in
the beginning, and very flexible later when you need it. As your business
grows, your charging can quickly get complicated. Think custom subscriptions
with conditional coupons, multi-currency, custom pro-rating, special discounts
with specific conditions. With your own charging solution, you can do all
these with ease. But if you off-load billing and charging schedule to an
external service (and use webhooks or reverse APIs), you will quickly discover
you're pretty limited.

------
busymichael
Stripe will handle the subscription plans, the period (monthly, annual, etc)
invoicing, the credit card security, the payment forms, discounts and pretty
much everything you need to run subscription payments. It took me less than 1
day to implement using their payment forms.

There are many stripe templates on github that help you get started in almost
any framework/language.

If you build your webhook correctly, you don't have to build any backend
payment management, you can manage directly in the stripe dashboard and it
will update your customer records directly through the webhook.

------
hbcondo714
There are a few plugins for WordPress that give SaaS capabilities fairly
quickly. For more custom development, SaaS starter kits & platforms I've used:

* WordPress - [https://restrictcontentpro.com](https://restrictcontentpro.com), [https://www.paidmembershipspro.com](https://www.paidmembershipspro.com)

* PHP - [https://spark.laravel.com](https://spark.laravel.com)

* Ruby - [https://bullettrain.co](https://bullettrain.co)

* .NET - [https://aspnetzero.com](https://aspnetzero.com)

* APIs - [https://www.chargify.com](https://www.chargify.com), [https://recurly.com](https://recurly.com), [https://www.chargebee.com](https://www.chargebee.com)

------
superasn
Laravel's cashier does a pretty good job at it. I think it hardly takes 5 to
10 minutes to integrate and you can have multiple integrations like Stripe,
Braintree, etc with Access control, coupons, etc..

------
mortond
I've just this week built stripe into my app. I use CRA with an ExpressJS
server to communicate with the Stripe API. I use Stripe to manage everything,
the only part I needed to implement was the webhook endpoint for cancelled
subscriptions so I can disable the account on my end and another endpoint I
call from the frontend to create the specific plan the user picked.

------
dyeje
What don't you find 'clean' about the Stripe integration?

