Ask HN: How do you deal with recurring payments?

48 points by Keats ↗ HN
How do you guys handle payment for your SaaS?

There are quite a few options, from plain Stripe/Braintree to layers on top of them like Chargebee/Quaderno or full solutions like paddle/fastspring.

Granted that the needs might be different if you are in Europe like us with all the special VAT handling.

30 comments

[ 3.1 ms ] story [ 80.0 ms ] thread
I've used plain Stripe for SaaS product payments with two products (most recently https://assertible.com)

Stripe is very simple and has a very high quality API. They recently made some improvements to their dashboard for subscription management.

I've never used a service on top of Stripe for handling payments but I'd love to hear what others use.

The main issue I see for us with plain Stripe is the EU VAT handling. If we could add a VAT field on the stripe checkout, that'd be neat
The other issue I saw with EU data is the EU privacy laws about where the Stripe data is stored. Stripe don't mention about where they store data in their privacy statement (https://stripe.com/gb/privacy).

However as far as I can tell - Stripe stores no customer details except for email and information that would be on a card.

As far as I can tell - Stripe doesn't store anything like addresses. So does this mean that you handle this yourself or just not store customer addresses?
Stripe allows you to store 'metadata' (key/value pairs of arbitrary data) with customers. Wouldn't that work for storing addresses?

https://stripe.com/docs/api#metadata

This just seems like a really bad idea. I remember shaking my head when people started injecting various extra information in a general field in a application I was working on a decade ago. There's no validation, no sensible structure, just a free for all. I just use some separate application on top of Stripe that stores this meta data in a sane way.
stripe also has a history or turning peoples processing off randomly, categorizing businesses incorrectly and generally not being agreeable or showing the ability to be worked with at times. in fact, on my personal card, almost every time ive used stripe it was declined or scrubbed in some way... sure makes your life easier, but you leave a lot of $$$ on the table.
We work hard to avoid ever inconveniencing legitimate businesses (and are constantly iterating on our processes to make it less likely that we do so). I suffered at the hands of many of these processes from other companies in the past; part of the point of starting Stripe was to do a better job on this front. However, thousands of new companies launch on Stripe every week and many of them do intentionally breach our terms of service (or commit outright fraud). So, it's a tricky exercise. I pay a lot of attention to individual cases where we ever make mistakes (and make my email address very public) to try to ensure that we rapidly repair any false positives that do occur.

We'd love to investigate any issues you may have had with your card. Feel free to email me and/or mlm@stripe.com (who helps to build our machine learning fraud models that detect our merchants from fraud) and we'll take a look.

While there's someone from Stripe there, are you planning to add VAT in the checkout widget? That's the main blocker for its use in Europe.
thanks for the reply, i have actually not had the opportunity personally use stripe(aside from making payments) due to so many colleagues that have used it always advise me to write my own or avoid stripe(i've written a few over the years).

next time i use stripe and have issues i will certainly send in the data to mlm@. i reckon if i have time to bitch about it, i have time to help you solve it. transaction security is important, sounds like that team has fun work/problems to solve.

I'll throw in one vote for writing your own billing system if possible. It doesn't have to be complex if you're not dealing with an existing legacy system or regulated industry. I process over $500K/year of SaaS subscriptions with basically just this:

* An accounts table with a paid_through column to identify when each person should next be billed

* A payments table into which you insert one row per payment for accounting/metrics

* A website form that submits to https://spreedly.com/ to tokenize payment information; the token is all you store

* A 100-line cron job that selects all the accounts whose paid_through date is in the past, then charges their subscription against their payment token, sends receipts or dunning mails depending on whether the charge went through, and updates the paid_through dates

Coupons, discounts, etc can be accommodated just by adding some columns and tweaking the billing script's SQL query. The payments table is sufficient information to calculate all the valuable SaaS metrics from your database as well -- CLTV, MRR/ARR, churn rate, etc.

Integrating with Spreedly instead of directly with a payment provider means you can change processors without changing any code -- your choice of payment processor becomes just another token.

What happens if the script dies after charging, before updating paid_through?
That's never happened in 12 years, but if it did, one of two things:

(1) I'd notice that I got fewer payment receipts than I expected that day, and go fix it by updating their paid_through date in the database. You'd be able to log in to your payment processing account to see whether the charge went through or not, so there's nothing unrecoverable about this situation.

(2) That customer would notice first, send an e-mail, and I'd have to apologize before fixing it.

Not a very concerning situation.

I'd be much more concerned about, say, vendor lock-in with an external billing provider that could terminate service or change terms on a moment's notice. Like all the "PayPal/Stripe froze our account" horror stories, or when Recurly dramatically increased their prices without grandfathering anyone in early in their history. No such concerns when you own the billing code, and don't store your customer info only with your current payment processor.

write your own, they arent terribly difficult to code, and you will have more control over your finances, fraud scrubbing and the likes. plus you save a ton in fees as you grow.
I use gocardless in the UK. Highly recommended.
Chargebee is good because you can swap backends (Stripe/braintree/paypal/authorize.net) without changing any code. So if your account gets nuked or you want to switch merchants for whatever reason, it's no problem.

@dangrossman mentioned storing cards in spreedly. I'm pretty sure chargebee does that already on the backend.

Stripe stores card details - so Chargebee has no real benefits here.

The ability to switch payment gateways doesn't seem like a massive one any decent system will allow this - e.g. Shopify, WooCommerce.

Chargebee does look like a very good option though. Stripe seems quite sensibly limited on what you can store in their system.

Also Chargebee pricing seems quite reasonable rather than requiring transaction percentage.

PayPal works fine. I'm US-based
I eagerly await your blog post. May it be as interesting as Notch's was.
Hi there! I'm Carlos, founder of Quaderno (https://quaderno.io). Thanks for the referral, Keats.

I built Quaderno two years ago because I was tired to deal with payments, invoicing, accounting, and tax rules (specially now when there are more and more digital taxes worldwide) in my past projects. My goal was to automate the whole accounting process for any SaaS.

Of course you can use your own billing system, but as Josh from Baremetrics say, "the danger in building internal tools is not that it saves an insignificant amount of cash, but that if stifles future cash" (Full article: https://baremetrics.com/blog/build-it-buy-it).

If you have any questions about Quaderno or how to manage payments for SaaS, please let me know. Happy to help.

What would you say are the big differences between you and Chargebee?
Chargebee is focus on subscription management. Quaderno is about accounting automation. We work not only with subscription based businesses but with any kind of digital businesses
I'll echo what others said: run your own.

Using a SaaS-based recurring billing solution has its drawbacks:

* You are limited by the features offered by the provider for your pricing schemes (for example, most only offer basic forms of usage-based billing)

* You don't have direct access to your data (analysis are limited by the types of reports the provider offers)

* Vendor lock-in: it's extremely difficult to move to a different provider (for example, you need to cancel subscriptions in provider A and re-start them at the right date in provider B to avoid double billing)

That being said, don't write your own! It's not as easy as it seems when you need to deal with multi-currency support, pro-rations calculations, timezones, etc.

5 years ago, we built Kill Bill (http://killbill.io/), the open-source subscription billing and payments platform:

* The platform offers a lot of billing schemes out of the box, but you can extend the logic (via plugins)

* Because you run the software, data belongs to you

* Payments are still delegated to a third-party gateway (Stripe, Braintree, etc.) which can take care of the PCI complexity

* For taxes specifically, you can either calculate them yourself or integrate with a third-party solution (e.g. AvaTax)

Keats, Thanks for mentioning Chargebee. Krish, cofounder of Chargebee here.

We support card data portability (we also use Spreedly to vault card as a service but we pay for it as an infrastructure) and in the case of Stripe we directly vault it in Stripe, as they do a great job of being friendly with customers and supports portability as well.

Apart from very detailed subscription management use cases, we enable hundreds of small things that come up as you grow beyond the first 50 customers - invoice based payments, coupon promotions for sales, credits (cash vs. promotion credit vs. proration credit) that finance cares about, detailed invoicing, accounting integration flow, taxes etc., while enabling pretty much everything with API as well.

Most of our customers find our product most useful once you grow beyond the 2 member founding team as the needs grow but you don't want to build spend your time building internal systems.

We share a lot of customers with Stripe / Braintree - Freshdesk, Study.com, Soylent etc.,

We also put a lot of focus on our customer support to respond within an hour for most queries and we generally deal with detailed use cases from non-technical members of team and we assist them.

This is a key area of focus for us, as that frees up a lot of developer distraction to address queries, as and when the cases arises. For an essential service like billing I believe it adds a lot of value, so we have built everything around having a very good customer support.

Happy to answer any questions.

Ahh, the buy vs build debate. Disclaimer, I work for https://www.chargify.com/, another provider of recurring billing software in the same space as Chargebee.

We see this question asked a lot it really boils down to resources and what you want to spend your time on. Yes, it is pretty easy to build a basic system with a gateway such as Stripe or Braintree but there are two main problems: 1. It does not scale well (your needs will likely increase) 2. Building and maintaining your own system takes away from focusing on your product (and it is not a core competency)...

As Krush said, there are "hundreds of small things that come up as you grow." By using a best of breed tool, most of these things are available out of the box with little to no dev work needed such as testing plans, coupons/promo codes, taxes, reporting/analytics, billing portal for customer account management, a portal for your support team to see/edit account history/info, system emails, dunning management, and so much more.

The price for billing software like Chargify is minimal compared to the time saved building and maintaining your own system. In fact, the money saved by leveraging our dunning features alone have proven to provide a 4x return based on the monthly cost of Chargify's software. So not only does it save a lot of resources, it provides an ROI.

We have a ton of people that come to us after building their own system, and wished they implement Chargify in the beginning. But it is never too late!

Happy to answer any specific questions.