|
|
|
Ask HN: How do I integrate subscription billing to my SaaS
|
|
5 points
by user3487
4201 days ago
|
|
Hi, I'm building a web and mobile based SaaS which has a subscription tier. It would be preferable to keep the billing outside the application (API) so that the product can stand on it's own, i.e. separation of concern. How is this managed the best? Is it even possible too keep them as separated as I wish for? I am thinking about just adding a "Stripe customer id" field to the account model, but I was hoping to not integrate Stripe directly. The plan is to use Stripe for the payments as I understand that they have a fantastic API. Thanks! |
|
Don't sweat the possibility that you'll have to change payment providers one day. You probably will, and it won't be anywhere near as much effort as you think.
I once switched a couple of my services from Amazon Payments over to Stripe in the course of an afternoon, fixing up the fields, adding a PaymentProviderID column to the table, and rewiring the backend. It was in no way painful. Certainly less effort than it would have been to build in an abstraction layer ahead of time that would have been any help at all during the conversion process.
This is a great example of "you aren't going to need it" combined with "you're just going to build the wrong thing" combined with "quit fannying about building crap you don't need and actually ship your product". To pull off the perfect abstraction layer, you'd need to know not only the system you were integrating, but also enough about the next system that you wouldn't have to do all those things I describe above anyway. It'll take you just as much time to do the work up front as it would to do it when you actually need it, but in the meantime you won't have a shipped product.
In short, don't sweat it.