How Does a Billing System Work?

Introduction

Hootsuite Engineering
Hootsuite Engineering
6 min readDec 21, 2017

--

Billing is easy right? Just charge a customer for the amount a product costs and call it a day! This works if you are selling physical goods for a one time purchase. However, if you are selling software as a service like Hootsuite, then billing gets a lot more complicated.

Over the course of my co-op term at Hootsuite I’ve had to wrap my mind around our complex billing architecture and figure out how to ensure customers get billed the correct amount of money on the correct date every month. I’ve had to consider details such as plans, subscriptions, billing intervals, bill cycle day, dunning, proration, and more. Don’t worry if you didn’t understand any of those terms. I’m going to take you through some common billing terminologies and examples so that by the end of this article you will be a billing expert!

What is a Plan? What is a Subscription? Are They Different?

Plans and subscriptions sound similar enough. They both sound like types of features or services that are provided to you in a recurring fashion. In fact, they are very closely related, but have slight differences. To understand the relationship between plans and subscriptions we have to break them both down individually. First, let’s start with plans.

To understand what a plan is, we first have to understand what a product is, and what a billing interval is. At Hootsuite, there are two categories of products; Base products and add-on products. You can think of a base product as the plan that you select when signing up for an account at Hootsuite. Some examples of base products are Teams, Professional, Free, and Enterprise. Next, we have add-on products. These are features that enhance the functionality of a base product through extra features or perks. Some examples of add-on products are paid apps, seats, Hootsuite Boost, and owl.ly Pro. Finally, we have to define what a billing interval is. A billing interval is the rate at which we charge a customer for their products. Since Hootsuite sells its services as subscriptions, we need to bill our customers periodically. There are two billing periods Hootsuite uses which are monthly and annual billing. As you might expect, this means that the customers either get charged for their products every month or every year. Now that we know what a product and billing interval is, we can define what a plan is. A plan is simply a pairing of a product and a billing Interval.

Next, we are going to quickly define what a subscription is so we can tie the concept of plan and a subscription together. A subscription is the combination of an account and a plan. This way, we can tie a plan to a specific member. I’ll wrap up this concept with an example. If a customer has a free base plan (at a monthly billing interval) with a paid app add-on plan (also with a monthly interval) then their subscriptions consist of the pair of those two plans.

What is a Bill Cycle Day (BCD)?

This is the concept that I found most confusing during my co-op term at Hootsuite. Simply put, a bill cycle day is the day which a customer gets charged for their subscription. You might be thinking “just charge a customer on the same day each month”, but it’s sometimes more complicated than this. I think this concept is best explained with a couple of examples and not with technical definitions. Let’s start with a simple example and then move on to a harder example. We are going to ignore the fact that a customer has a trial period when they first sign up for a Hootsuite account for the following examples.

Example 1: One subscription, constant BCD

In this example the customer has signed up for a Professional plan at a monthly billing interval. If they signed up on the 15th of December then they will be charged their monthly fee on the 15th of every subsequent month. That example was simple enough; Time to complicate things a bit more.

Example 2: Two subscriptions, Constant BCD with proration

Before I explain the above diagram, we need to define proration. Proration is the process of reducing the cost of a product that has not been used for its full term. Similar to the last example, the customer has signed up for a Professional plan at a monthly billing interval. They signed up on the 15th of December so they will be billed their monthly fee on the 15th of each month. However, the customer has also decided to purchase a paid app on the 1st of January. The billing interval of the paid app is also monthly so the customer will now be charged on the 15th of every month for the professional plan, and additionally on the 1st of every month for the paid app. We don’t want to send our customers two invoices every month so we must perform an operation called co-terming to align the bill cycle day of the professional subscription and the paid app. Essentially, we want to charge the customer a reduced fee for the paid app subscription from the 1st to the 15th and then start charging the customer the full monthly amount for the paid app on the 15th which will be aligned with the professional plan subscription. As you can see in the diagram, the paid app proration occurs in the first billing interval from the 1st to the 15th of January and then from the 15th of January onwards, the bill cycle day of the professional subscription and paid app subscription will be the same.

Things get much more complicated when there are multiple base plan changes and add-on subscription changes in a single billing interval. This isn’t a very common use case though so I won’t subject you to any more complicated scenarios.

Dunning (Dun-Dun-Dun)

Dunning is the process of communicating to customers who haven’t paid their bills and requesting that they do. As a Hootsuite customer, you will be placed in dunning if you have failed to pay your bill (either monthly or annually). If you stay in dunning long enough then your account will be suspended. During the dunning process, the customer will be sent emails requesting that they pay their outstanding charges. The moral of the story is always pay your bills.

Conclusion

Working on the Self-Serve team this co-op term taught me a lot about how complicated it is to collect money from customers. There is definitely more to learn and understand, but now I can confidently describe the topics I talked about in this post. Billing was quite a different world than I imagined but I am very glad that I embarked on this journey! Hopefully, you understand a little more about how a billing system works now too!

About the Author

James is a full-stack developer co-op on the Self-Serve team at Hootsuite working on the billing service. He is a 3rd year student at the University of Waterloo studying Computer Science. Connect with him on LinkedIn.

--

--