Skip to content

💰 Billing & Payments knowledge for cloud platforms

License

Notifications You must be signed in to change notification settings

kdeldycke/awesome-billing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

💰 Awesome Billing

Yᴏᴜʀ Pʀᴏᴅᴜᴄᴛ ʜᴇʀᴇ!
Add a link to your company or project here: purchase a GitHub sponsorship.


Money is the most universal and most efficient system of mutual trust ever devised.
— Yuval Noah Harari[1]

Any company needs at one point to get money from customers. That's when things gets messy for us developers, as we try to reconcile the complexity of the business with our software stack.

This Awesome list helps software engineers bootstrap billing & payments systems, and make sense of invoicing, pricing, accounting, marketplace, fraud and business intelligence.

Contents

Basics

In a Stanford class providing an overview of cloud computing, the software architecture of the platform is described as in the right diagram →

Billing is one of the transversal pillar of the ecosystem, where customers, products and business meets. The other pillar being Identity and Access Management (IAM) 👤.

This highlight the strategic importance of the domain, not only for cloud providers but virtually any business, especially those who are software-centric.

Pricing

From monthly subscription to commodity-like on-the-go consumption, there's plenty of scheme out there to structure your product's pricing. Including the good old shopping-cart funnel.

Usage-based Pricing

The dynamic scheme for elastic resources.

Subscription Plans

Highly popular for SaaS businesses, subscription plans are easy to comprehend.

  • Pricing low-touch SaaS - “In low-touch SaaS, the most common way packages are presented are as different columns in a pricing grid, with each column corresponding to a plan, offered at a different price, with differential access to features or maximum allowable usage along some axis interesting to the business.”

  • Lotus - Open-source project to manage pricing & packaging infrastructure.

  • f-license - Open-source license key generation and verification tool in Go.

Hybrid

Uncommon pricing schemes.

  • The Three Part Tariff - Beyond linear pricing, there is a place for additional platform fees and free-tiers in the pricing structure.

Strategy

Theory and practical insight to help you choose the right pricing tactics.

Market Research

Survey methods and price discovery techniques to find the right price point.

  • Jeremy Howard - From Predictive Modelling to Optimization - “In insurance, the price is the product. (…) How do I change price to make shitload of money?” Or how to deliver results (optimal price for a customer) instead of delivering data (calculating a customer's risk, which had been the standard approach used by actuaries previously).

  • Gabor–Granger method - Used in surveys to determine the price for a new product or service. The results can be used to produce a demand chart and a revenue curve.

  • Van Westendorp's Price Sensitivity Meter - PSM is a market technique for determining consumer price preferences. Allows for drawing a revenue curve to estimate the price point delivering the maximum revenue.

  • Pricing niche products - “The most compelling argument against simply picking a price, though, is that it limits how much you can learn about your market.” Then the author setup vickrey auctions to discover price.

  • Finding the max revenue price mark for digital products - “To find the optimal price that provides maximum revenue for your product you will need to field-test several price points; you then reconstruct the revenue curve and find the peak.”

  • Personalised pricing and EU law - Some cases of price personalisation are prohibited in EU due to consumer protection and data protection rules.

Product Catalog

The central repository of all available services, products, variants, options and pricing available to the customer to purchase. Catalogs for cloud services are most of the time tailor-made, but there is some classic PDM solutions (Product Data Management, a.k.a. PIM for Product Information Management) out there that might fit the bill.

Calculator

Simulate a virtual invoice depending on the resource you plan to use.

  • Cloud Cost Calculator - Web-based tool for finding the cheapest cloud servers for a given set of requirements.

  • Cloudorado - A comparison matrix which use ECU (Amazon's vCPU) as a CPU power measure unit.

  • EC2Instances.info - Easy Amazon EC2 Instance Comparison.

Cost Forecast

Help your customers predict their upcoming and future consumption based on their past usage.

Marketplace

A marketplace connect supply with demand that lead to a financial transaction. If there is no payment involved, then it is an aggregator, or a hub. Not a marketplace.

Cloud Resources

This sub-section focus on bid/ask mechanism matching resource producer with consumers. Most of the time these are one-sided markets with the big platform trying to amortized under-utilized inventory.

Online Ads

Targeted online advertisements marketplaces have a lot in common with traditional cloud marketplace. Some good inspiration there, from concepts to tech.

Accounting

  • “The Accounting department is usually backwards facing. The Finance department is usually forwards facing.” (source)

Double-Entry Model

The core concept of accounting is double-entry. It is the most critical part to grasp in order to properly design any robust system that tracks money.

Bookkeeping

Everything you need to know about the daily practice of keeping your accounting data clean and tidy.

  • So, you want to learn Bookkeeping! - Focus on the daily operations of recording and maintaining the transactions of a business.

  • Reconciliation: A game designed to frustrate the player - “Reconciliation is a business process which arises almost entirely because of a lack of structured data in the pipelines that convey money between businesses”. There are some hack to streamline the process, like adding an arbitrary discount to produce unique trailing decimals, or setup a couple of virtual bank accounts as proxy.

  • Plain text accounting tools - Extensive list of open-source personal finance projects that might be great to look into for inspiration on double-entry accounting and bookkeeping.

  • And a list of graphical accounting tools: GNUCash (GTK+), Grisbi (C), Firefly III (PHP).

  • GnuCash Tutorial and Concepts Guide - A complete tutorial on personal finance tracking with GnuCash.

  • Frappe Books - Free Desktop book-keeping software for small-businesses and freelancers.

  • Luca - YAML accounting and JSON tax forms.

  • Sequence - API that store, validate and reports asset movements. Also known as a Ledger. Sequence is immutable, scalable, and easy to use.

  • Go DB Ledger - An open source accounting system that aims to make the recording of double entry bookkeeping transactions programmable.

  • Ledger - A scriptable financial ledger, designed to make it easy to model complex financial transactions.

  • Akaunting - Open source software designed for small businesses and freelancers.

Software design and implementation

Now that you're somewhat familiar with the concepts and practice of accounting, here are some resources to help you implement that knowledge into software systems.

  • Moonpig: a billing system that doesn't suck - Design decisions behind a billing and accounting system. Key takeaway: some companies still pays by checks; do not use floats; complex customer workflows; date and time issues; mutable data.

  • Books, an immutable double-entry accounting database service - Explain the basic data model of a double-entry accounting system relying on Google Spanner for internal use at Square.

  • TigerBeetle - A distributed financial accounting database to ensure that the money either moves, or doesn't move, that it doesn't get lost somewhere in between.

  • Django Hordak - Core functionality of a double entry accounting system for Django.

  • Managed accounts for Django - A 'managed account' is an allocation of money that can be debited and credited.

  • Triple‐entry accounting with blockchain: How far have we come? - “Triple‐entry accounting is a new and a more efficient way to address fundamental trust and transparency issues that plague current accounting systems. Triple‐entry accounting with blockchain, when properly implemented, can fundamentally improve accounting.”

Currencies

Global companies needs to know how to juggle between local currencies.

Finance

Once you've got your accounts in order, you can start extracting insights and metrics from your financial data.

Contracts

All the invoicing terms & conditions are materialzed by the contract signed between the end-user and the service provider. That's the source from where we derives all the rules of the billing cycle.

  • Is this what Enterprise mean? - When contracts, invoicing and payments are not working together, you end up alienating your big enterprise customers. See the associated HN comments on bulk license purchase.

  • Entitlements untangled: The modern way to software monetization - “The concept of Entitlements encapsulates the feature access settings under various product variants (aka Pricing Plans or Packages), bridging the gap between how a product is sold and how it behaves for a variant. In essence, entitlements are a set of permissions defining what a customer (paying or non-paying) can do with your software application.”

  • CUDs vs. Commit Contracts vs. SUDs in Google Cloud - Explains the differences between various types of discounts and usage commitments in GCP.

  • Quantity discounts on a virtual good: The results of a massive pricing experiment - “Implementing price reductions ranging from 9–70% for large purchases, we found remarkably little impact on revenue, either positively or negatively.” If discounts are a placebo and are still widely used in the industry, maybe they are a marketing hack to lure big customers?

  • “It used to be I could just give a lump sum and let Google Ads play until there is no more budget. Not anymore.” - (source) - Google Ads used to implement a concept of capped actuals. A kind of monthly budget with rollover, which is an optimal billing scheme to limit surprises for customers. It always looked to me as a way to sell quotas.

Coupons and Vouchers

Taxes

European VAT

Invoice

The invoice materialize a consumed service or purchased product, waiting to be settled by a payment transaction.

  • On GCP invoiced billing - Invoiced billing is a B2B-friendly payment happening after the service is consumed and an invoice issued. It seems to be a pain to setup on GCP but I suspect is a consequence of trying to reduce (costly) fraud.

Structure

  • Content of EU invoices - The information required on a EU invoice is detailed by Article 226, Section 4 (Content of invoices) of Council Directive 2006/112/EC on the common system of VAT.

Integrity

Once issued, an invoice must be immutable.

Generators

  • Manta - Flexible invoicing desktop app with beautiful & customizable templates.

  • InvoicePlane - A self-hosted open-source application for managing your invoices, clients and payments.

  • InvoiceGenerator - Library to generate a simple invoices.

  • Ruby Invoicing Framework - For generating and displaying invoices (ideal for commercial Rails apps). It allows for flexible business logic; provides tools for tax handling, commission calculation etc.

  • Refact - A design project trying to revamp a phone bill with infographics.

Extractors

  • InvoiceNet - Deep neural network to extract intelligent information from invoice documents.

Electronic invoices

  • Factur-X - Python library to support the e-invoicing standard for France and Germany.

  • Universal Business Language - Most invoicing software can read and write UBL documents (XML) for data transfer.

  • EU eInvoicing - European standard on electronic invoice.

  • GOBL - JSON Schema, Open Source Go library, global tax database, with conversion tools, all in one.

Payments

Receipt

A receipt materialize the payment transaction.

Credit Cards

The most popular payment device.

Bank Accounts

The old-fashioned way of payment: by the way of banks.

Online Payments

The usual money transfer services.

  • UPI 101: The Basics - “In this article, we will learn about India's Unified Payments Interface. A four-year-old payment scheme that has been accounting for 40-45% of digital payments across India.”

  • 20 years of payment processing problems - A huge collection of everything that went wrong, and still is, with payment APIs from the past 2 decades. Any issue exposed in this article that gets unaddressed will end up as stolen money.

  • The untold story of Stripe - In which we learn that “once turnover hit a certain level, Paypal automatically put the business on a 21 to 60 day rolling reserve, meaning that up to 30 per cent of a company's revenue could be locked up for up to two months.”

  • Idempotency in the context of payments - “Idempotency prevents race conditions. Idempotency dictates that multiple identical requests from the same client do not result in a different final state.”

  • Optimizing payments with machine learning - Describes a classic payment workflow, then how machine learning can replace hard-coded business rules and fine-tune the payment failures/retries loop to increase the success rates of charges.

Fraud

There's monetary incentives to exploit your business. Be prepared to fight hordes of fraudsters and shady users.

Cards

The majority of fraud is exploiting the most common popular payment device: credit cards.

Trust Score

Synthetic score based on a collection of signals are often the best proxy of user's trustworthiness. Customer support most of the time rely on them to take action when these actions are not triggered automatically.

Statistics

Best tools to automate fraud detection.

Billing

UX/UI

Users gets easily angry when it comes to money. UX and UI might helps a lot to reduce frustration.

Business Intelligence

As stakeholder of the billing pipeline, you sat on all the critical data to measure and report on the health of the business.

Metrics

Definition and collection of Key Performance Indicators (KPIs) worth monitoring.

Customer Lifetime Value

How much net value do you produce per customer? The Customer Lifetime Value (CLV, or LTV for Life-Time Value) quantify that. Understanding and acting on it is the most important part of your business's sales efforts.

  • You're all calculating churn rates wrong - “On the surface, churn rate may seem like a natural proxy for changes in customer lifetimes. Let's dig into why that is not true.” Churn rate is not a meaningful metric to compute CLV: during the customer lifetime, the churn probability is not constant. Most of the time because of your free trial and vouchers. This article illustrate the influence of the distribution used to model the probability of a customer quitting.

  • How to project customer retention - A seminal paper, with a stronger approach compared to the one above: the exponential distributions is replaced by a geometric model, which is better suited to discrete time intervals like monthly contracts, the former being more appropriate to continuous time process.

  • Survival Analysis For Customer Retention - Illustrates how retention can be better modelled using a survival function like Kaplan–Meier survival curves.

  • RFM (customer value) - A refined model of CLV, used to segment users based on Recency, Frequency and Monetary value.

  • Churn Prediction - “How to use Python in a simplistic way to fuel your company's growth by applying the predictive approach to all your actions.” Relies on XGBoost binary classification.

  • Lifetimes - A full-featured Python package to analyze your users based on their "alive" and "dead" states.

  • retentionizer - Python package to show the projected retention rates for each cohort and calculate the LTV of a given customer in that cohort.

Data Engineering

To industrialize data production and consumption, your need data engineers to clean up, persist and consolidate data. Only after you get these data foundation you might think of onboarding data scientists.

  • AI vs Data Science vs Data Engineering - “Data Engineers build data pipelines and infrastructure to ensure a constant availability of transformed data. Data Scientists analyze and build models from these data to develop new product features or drive the bottom line of the business.” As for AI professionals, their focus is on cognitive automation.

  • Ten Ways Your Data Project is Going to Fail - You don't need data scientists. “For ETL, hire data engineers. For reporting, hire BI analysts. The end.”

  • Cargo cult data science - “Data science is best viewed as a form of company culture, rather than a set of technologies. However, many firms will try to create that company culture by acquiring data-science technology, rather than working on their culture.”

  • Why not use Double or Float to represent currency? - Because of precision: floats and doubles cannot accurately represent the base 10 multiples that we use for money.

  • Never Use Floats for Money - “This is precisely the problem we have when trying to represent 10^-1, or 0.1 in binary. There is not an exact binary representation of 0.1 or 0.01.”

  • European Spreadsheet Risks Interest Group - Horror Stories - A collection of cases in which uncontrolled and untested spreadsheet models led to lost revenue, mispricing, poor decision making, fraud and systemic financial failure.

Tools

Software to build visualizations, dashboards, SQL queries and drill down into data.

  • Practical Business Python - A blog collecting and spreading ideas on how to use Python more effectively in the business setting.

  • redash - Connect and query your data sources, build dashboards to visualize data and share them with your company.

  • Metabase - Metabase is an open source solution to explore and visualize data and supports lots of databases.

  • Apache Superset - Enterprise-ready business intelligence web application.

  • Meltano - Open source convention-over-configuration product for the whole data lifecycle, all the way from loading data to analyzing it.

  • insights - Insights is a tool to visually explore a PostgreSQL database, with an emphasis on generating graphs that show business performance over time.

  • falcon - Free, open-source SQL client for Windows and Mac with builtin graphs.

Competitive Analysis

A bunch of resources to keep track of the current status and progress of all companies operating in the domain.

  • Patents on billing systems of the dot-com era - All of them have been abandoned and constitute prior art. This means there is nothing to prevent anybody to implement or commercialize these concepts.

  • “You need a slightly more sophisticated developer team to cobble together a billing platform” (source) - Google's Product Director take on building billing systems: you need a certain kind of engineers to tackle that domain. It is not for everyone.

Cloud providers

History

  • “Larry Page went to U of M and used the Michigan Terminal System. (…) when Google was working on App Engine, Page took inspiration from MTS and would exhort engineers to follow its example. (…) when I look at my AWS and GCP bills now, it feels very familiar!” (source) - The direct filiation between old-school university mainframes and current cloud services.

  • Engineering and Operations in the Bell System - Starting at page #445, the "10.5 Billing Equipment and Systems" section describe the history and technical evolutions of Bell's phone calls metering and pricing.

  • The vanished grandeur of accounting - Accounting paintings were a significant genre in Dutch art.

  • Graphic methods for presenting facts - A way to optimize pricing using a physical model made in plaster of Paris, from 1914.

Humour

Billing is not funny.

  • Detax - A site mockup of an tax avoidance product for small businesses.

Contributing

Your contributions are always welcome! Please take a look at the contribution guidelines first.

Footnotes

The header image is based on a modified photo by Denny Müller.

[1]: Sapiens: A Brief History of Humankind (Harper, 2015). [↑]