jevon / awesome-billing

💰 Billing & Payments Knowledge for Cloud Platforms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

💰 Awesome Billing

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, my only growth hack at Qonto - Most businesses don't know how to iterate over pricing: sales teams dictates them without involvement of the people in charge of implementation, which ends up in frustration for all. That's why you need to recognize billing as a critical function of your organization.

  • 5 things I learned while developing a billing system - A great introduction on all the various aspects of a billing system, from currency to invoices, including great illustrations about plans change logic. All these topics are later detailed in dedicated sections below.

  • Open guide to AWS - Links to the Billing and Cost Management section which details the broad characteristics of billing for a cloud provider.

  • How to recruit software engineers in this domain? “The trick is to make the accounting/billing/payment department the antechamber of data engineering.” (source)

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.

  • Google Ads API: BillingCap enum - Capped actuals: monthly with rollover, an optimized pricing scheme to limit surprises from customers, in which we more or less sell quotas.

Strategy

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

Market Research

Survey methods and price discovery technics 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 and payment terms and conditions are materialzed by the contract signed between the end-user and the service provider. That the source from where we derives all the rules of the billing cycle.

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.

  • Volcano - Flexible, gateway-agnostic billing system.

  • 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.

Extrators

  • 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.

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 everythings 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.

  • Driving Global Fraud Losses Down While Empowering Business Growth - In this talk by Uber Eats, we learn from the biggest payment processor that “growing businesses with declining loss rates is extremely rare in the industry”. Also, fraud can takes several forms: chargebacks on non-perishable goods, promo abuse, refunds…

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.

Cloud providers

History

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.

About

💰 Billing & Payments Knowledge for Cloud Platforms

License:Creative Commons Zero v1.0 Universal