Developers building products that move money need to find scalable and reliable ways to track said money movement. A database tailored for financial data is an under-appreciated staple in many fintechs, marketplaces and financial services companies—and it can inform in-product payments, digital wallets, programmatic payouts, and more.
We offer this database as a service via Ledgers. Leading payments companies use Ledgers to integrate double-entry logic directly in their infrastructure. We provide primitives for a scalable data store that are flexible enough to record the unique payments flows of a variety of businesses (find our detailed principles for scaling our ledger DB here). We also give our customers expertise on the most common patterns for extending this flexible and un-opinionated API and data store.
Today we’re excited to announce Ledger Event Handlers, a feature to help customers abstract away their most common ledgering patterns. With Ledger Events customers can set Event Handlers that act as templates to ledger transactions, therefore simplifying and increasing velocity in ledger integrations.
What are Ledger Event Handlers
Ledgers is designed to give developers maximum flexibility when building payments infrastructure. Today, our API lets you create arbitrary double-entry transactions.
This often means engineers building on Ledgers, as well as other consumers of their microservices, need to understand accounting principles. We wrote accounting for developers for this reason: a way to demystify accounting principles for developers who work with products that move money. In practice, engineers needed to add custom double-entry logic to each API call.
Ledger events changes this by letting you you can interact with the ledger using business events instead of double-entry logic:
A business event can be any financial transaction that needs to be added to the ledger: interest accrual in a ledger account, a new invoice to be paid, or a payout that deducts a balance. The ledger event handler works as a template that applies a set of double-entry rules to business events of the same type.
Using Ledger Events
Customers can use ledger events in the following ways:
- A marketplace executing regular payments to third parties might use ledger accounts to track balances. Instead of specifying what accounts need to be credited or debited each time, a handler can be defined to treat all payments similarly every month—the API will then automatically parse the appropriate accounts to debit and credit.
- A lending or investing platform might create a ledger event handler to determine how interest calculations to ledger account balances should be processed.
- A digital wallet platform might create handlers that define patterns for user deposits, withdrawals, in-app transfers and more.
- An enterprise business, or any company moving money at scale, might create handlers to expose billing APIs to other internal teams, according to their use case.
Ledger event handlers can also be a good way to integrate ledgers with other systems. Our ledger events endpoint is designed to take custom data via open-ended json payloads, giving developers additional flexibility.
Finally, ledger event handlers can complement the use of our Payments API by letting customers customize the logic for logging ledger transactions whenever payment orders or expected payments are created.
Ledger Balance Alerts
Ledger events are particularly useful when coupled with additional features we launched recently.
Ledger Balance Alerts can trigger notifications when ledger accounts fall outside pre-specified ranges. Customers can also now create ledger transactions directly when creating associated expected payments in the UI.
Subscribe to Journal updates
Discover product features and get primers on the payments industry.