Chargebee - how to build own subscriptions base product faster

Marcin Ślęzak 2020-03-29

We all used to work with many tools and services. It speeds up our work and allows us to focus on the core of a business. Usually, we don't want to resolve issues that already were resolved by someone else. Building a subscription-based product is not an exception. Everyone, who want to build one, needs to implement the whole subscription model that already was implemented many times by other people. Let's see how Chargebee can speed up subscription model implementation in your next SaaS product.

A subscription model is an approach where a customer needs to pay a recurring price at regular intervals for access to a product. Business benefits from predictable, recurring income. Customers don't need to pay a huge price upfront. It's no wonder that so many companies use a subscription model for own products. We used to have access to software in a subscription model (Photoshop, Slack, Gmail, Atlassian, MailChimp, Dropbox etc) but an idea spread for other types of products like media and content (Netflix, Spotify, Youtube) or even physical goods (Grover). The subscription model is a challenge for software development. Customer management, offer configuration, subscription periods, payments, invoicing and taxes, discounts and many other elements can take many months to implement correctly.

Chargebee is a service that covers all boring subscription model related tasks and allows teams to focus on building and launching own business. You can use Chargebee to manage:

Chargebee provides panel on the website for non-technical people to manage a system and REST API that allows integrating with your application. To make integration even faster, Chargebee provides client libraries for most popular languages like PHP, Ruby, Python, Java, .Net or NodeJs.

Checkout process

Planscustomers and subscriptions can be added by the administrator manually. Usually, only plans need to be configured as customers and subscriptions usually are added to the system by the checkout process. Checkout is a process where the customer creates an account, choose a subscription plan and allow to be charged automatically regularly. Chargebee built components and pages that facilitate building checkout on your website. If components and pages configuration is too limited for you then you always can build checkout on your own and use Chargebee API to push order data to Chargebee. Of course, this approach requires more work but gives you much more control on user experience.

Chargebee, base on subscription configuration calculate when and how much charge customers for a product. Chargebee creates invoices automatically and trigger payment transactions but do not charge customers directly. The payment transaction is processed by payments gateway providers like Stripe, PayPal or Braintree. Chargebee support and integrate with over 25 different payment gateways. Each payment gateway has own list of supported payment methods like Credit Card, Direct Debit, Digital Wallets etc. The configuration is straightforward and should not be a problem even for a non-technical person. Invoices and payment transactions can be managed by the website panel and API.

How to integrate with Chargebee

Your product is the most important and you need to ensure that your application can handle many customers and separate their data respectively. Simplest implementation can assume that the customer is also a single user who has access to your product. Often, it's not so simple and tenant concept need to be implemented. A tenant is a person or the organization that owns and manages access to your product. No matter if you follow a single-tenant architecture (separated infrastructure for each tenant), multi-tenant architecture (tenants share the same infrastructure) or any hybrid solution. Tenant and user access logic is specific for each project and that is what you need to implement yourself. You can use Chargebee API (HTTP based, REST) to get information about tenants who subscribed products and status of their subscriptions but you need to figure out yourself how to map it to specific users.

Chargebee provides a few key features that help Software Developers to build and support integration:

Building own, custom checkout process gives you full control on user experience but it requires some attention to security aspects. Two most important constrains:

Components or pages built by Chargebee are compliant with PCI DSS and PSD2.

Much more for much less

The subscription model is not so simple after all and brings to the business a lot of new challenges. A growing number of invoices and payments makes manual accounting processes inefficient. Chargebee has a set of features (emails, retries) that address issues like expired credit cards or insufficient funds. It's just a matter of time when on the board will be taxes configuration, price based on usage, coupons, paid addons or advance reporting. Chargebee is a pragmatic tool, that covers all of those issues. Especially, if for early-stage startups are for free.

© Marcin Ślęzak - made with ❤