Discover our latest AI-powered innovations around faster payments, smarter workflows, and real-time visibility.Learn more →

Journal

Managing Programmatic Payouts with an Application Ledger

A look at how you can use an application ledger to keep track of balances and transactions on your platform and build programmatic, instant payouts.

Lucas RochaPMM

Programmatic Payouts

Anytime you need to keep a tally of funds for someone, which then get deducted, written off, or zeroed out in a specific schedule, you have a situation where programmatic payouts might be required. For instance:

  • You are a marketplace that receives payments from one side of your network, but only pays out to the other side of your network on a regular cadence.
  • You are a fintech that accrues funds to users based on specific business events (say, interest on a loan), which then get zeroed out upon another set of business events (say, repayment schedules).
  • You are a SaaS or eCommerce business with a credit or rewards program that allows users to withdraw or use their funds.

These use cases often go hand in hand with keeping a digital wallet for users.

For example, ClassPass is an early Ledgers customer. In their service, you can sign up for a subscription membership for fitness studios in your area. Every time you go to a class ClassPass accrues funds to the studio you visited. At the end of the month, they zero out the balance for each studio. We wrote a detailed case study on ClassPass explaining how an application ledger was vital for them to scale to tens of thousands of studios.

If you are serving any of the use cases above, Excel or Google Sheets can keep track of amounts due in the early days. But if your goal is to scale payouts to hundreds of thousands or millions of users, an application database is necessary.

Mapping the Data Flow

Schematic of a ledgering system focused on automatic payouts.
Schematic of a ledgering system focused on automatic payouts.

In the example above we show a ledgering system. It sits between data sources and destinations. Sources include external business events, piped via application logic, and internal processes. If, for instance, you have a team truing up user accounts regularly on Excel (an internal process), you can translate that data into the ledgering system via API calls.

Destinations, on the other side, include the places where you will display information to your users (in-app balances), to stakeholders in other teams (internal dashboards), and the logic you use to decide when and how to execute a payout, as well as how much to pay it out for.

In the middle, the ledgering system keeps track of the following:

  • All of your accounts—every counterparty for which you are tracking funds and executing payouts.
  • Every single transaction that happened on your platform. Ideally, that’s enriched with metadata, timestamped, well served by webhooks, and with protections such as idempotency, immutability, and concurrency controls to make sure things don't break at scale.
  • If needed, you can serve different currencies by creating a separate ledger.

Building Instant Payouts

A few of the benefits of using an application ledger when managing programmatic payouts include:

  • A real-time database that’s automatically connected to your backend systems ensures you always have up-to-date information on balances. Without slow manual reconciliation, your finance team is free to focus on higher-value analysis. Plus, your engineering and product teams can focus on building features that are more important to your customers.
  • You can create more sophisticated rules around your payout logic. For instance, if you have a marketplace, you can set up a rule that pays out vendors in different schedules for products sold. Or, say, a vendor is paid out in different schedules based on their size and importance to your marketplace. A real-time database allows you to tailor payout schedules without adding operating complexity: it’s all in the code.
  • You can scale. It’s fine to start with manual systems early on, but they tend to break when you’re keeping track of more than a few dozen counterparties—usually around 100. Payments get returned, there are reversals, bank reconciliation takes time, and wire details can be wrong.
  • Most important, you can create instant payout experiences. If you are moving money between two parties in the ledger (like Venmo), balances are updated automatically, without the need to touch a bank account. If you are paying out to a bank account, you can couple the application ledger with a strong payment operations system (like our payments API) and use RTP to programmatically send money in real-time.

If you are a company looking to do programmatic payouts, you might benefit from using a real-time database that enables you to scale. Take a look at Modern Treasury Ledgers and reach out if we can be helpful.

Last summer we talked about how marketplaces use Modern Treasury to monetize payments by being in the flow of funds: accepting payments, managing payouts, and holding balances for users. Now, we’ll go deeper into these last two aspects and explain how companies can use an application ledger to keep track of balances and transactions on their platform to automate payouts.

For context, we define “application ledgering” as a database that keeps track of transactions occurring in your platform in real-time. This is different from an accounting system, that consolidates historical information for reporting purposes, which we discuss in more detail here.

Try Modern Treasury

See how smooth payment operations can be.

Talk to sales