Modern Treasury - Setting Up Your Payment Operations Architecture
Modern Treasury - Setting Up Your Payment Operations Architecture
Modern Treasury - Setting Up Your Payment Operations Architecture
component to creating better experiences for customers and businesses alike. This eBook
digs into how to think about setting up your payment operations stack and key
considerations for a growing company.
CHAPTER 1
● Payment initiation: Initiating a transaction via a chosen payment rail (see chapter 2
for more information on payment rails). This can happen via API, through a bank
portal, or by hand (a swipe of a card or the writing of a check). Depending on your
set up, there can be various roles that initiate or approve initiation of payments.
● Cash visibility and treasury: Understanding which funds are flowing through
which accounts, what you're earning on those accounts to maximize your bottom
line, and how much you have on-hand to exercise at any given moment.
CHAPTER 2
As you think about which bank—or banks—to work with, think about what
accounts you might want to set up and what the structure of those accounts
should be. Are you going to need virtual accounts, or would you want to set up an
FBO, or “For Benefit Of,” account for your products to help manage your user
funds without assuming ownership?
When considering payment rails, factor in elements like speed, cost, ubiquity, and
transaction limits into your decision. For instance, wire transfers are instant and
typically get used for higher-dollar volume payments, but cost more than other
options. If speed is a factor, instant rails like RTP and FedNow can be good
options, as they are cheaper than wires; however, they are constrained by which
banks offer them and by transaction limits (right now, these are $1M for RTP and
$100K for FedNow).
ACH works well for sending lower dollar volume while giving you the ability to pull
funds directly from customers—most businesses transact via ACH for this reason.
It’s also cost-effective, though you sacrifice some speed—for regular ACH,
payments arrive within 2-3 days. Your decision in selecting payment rails will
depend on the functionality you need and your bank’s capabilities.
1
B2B Payments Market: Global Opportunity Analysis and Industry Forecast 2021-2031. Allied Market Research, Sept.
2022.
2
P2P Payments Market Outlook. Allied Market Research, Sept. 2021.
Any business looking to move money through its products or services needs to
consider how money transmission laws might apply to their business model. This
can be challenging, especially for companies serving the entire US market, since
money transmission laws vary significantly between Federal and State
jurisdictions, and between different states—and they are notoriously tricky to
apply existing guidelines to new business models and technologies.
Yet more and more, product and payments teams are becoming more involved in
payment operations. This is due to new business models, such as embedding
financial services, that require the technical teams to become involved in payment
operations. Across teams and systems, there needs to be controls and processes
to manage payment operations seamlessly.
When money moves, it always moves from one bank account to another. The flow of funds
is composed of one or more “hops” of money between bank accounts, which may be
owned by you, a third-party processor (TPP), customer, or vendor. The flow of funds is a
common way to understand a business and model payments risks.
Method 1: Direct
In a direct approach, money flows directly from the Source to the Destination. In this case,
Modern Desks is not in the Flow of Funds. Modern Desks is simply displaying the Seller’s
goods but not processing any payments directly. Perhaps when a buyer clicks on a used
desk to purchase, they are taken off Modern Desks’ website and onto the Seller’s website
where they can pay.
Given this Flow of Funds, there is virtually zero risk or liability to Modern Desks; they never
touch the money, and therefore they are not liable should the Buyer issue a return.
For Modern Desks, perhaps they have a “Purchase Now” button, which collects the
Buyer’s banking information and initiates a debit. The debit will be the TPP (not Modern
Desks) pulling the money from the Buyer’s bank account. The TPP will then later transfer
that money to the Seller (less Modern Desks’ fees).
The key benefit of this method is reduced liability. These liability benefits are typically seen
if the TPP has a strict compliance program, requiring them to limit amounts transferred,
verify identities, and ensure that the originating account can cover the cost of the
transaction. However, because the third party processor takes on this liability, there are
often fees associated with using one. Additionally, the fact that they hold funds, means the
payment will take longer to settle.
Being directly in the flow of funds, Modern Desks is liable for any risk in the two
transactions: pulling money from the buyer, and pushing money to the seller. The riskier of
these is pulling, or debiting, from the buyer. However, if most of Modern Desks’ buyers are
larger corporations who have funds to pay for their goods, they might assess this flow of
funds as “low risk.”
There are also benefits in this method. The first major benefit is cost. Most TPPs charge a
high percentage fee for just the transaction alone. The second major benefit is a completely
custom flow of funds, only restricted by your bank. Sitting in the flow of funds gives
businesses the most control over user experience, timing, and more. The final major benefit
is control of risk tolerance and compliance programs.
Should the Buyer issue a return against the TPP, the TPP will immediately issue a return
against Modern Desks’ bank account. The return costs Modern Desks money, and Modern
Desks will have to cover the balance if they already transferred the money out to the Seller.
In some cases, TPPs may only offer Method 2 or Method 4 based on their agreements with
their banking partner. For example, they may be forbidden to hold funds on behalf of a
customer’s customer or be restricted to only paying out verified direct customers.
Typically, large companies that process high volumes of payments benefit from building an
integration. They have a full team dedicated to the process. For a startup or growing
company, building an integration is possible, but difficult since most of these types of
companies either lack the payment expertise or tech resource capacity.
Different banks also have different requirements, which can also vary based on payment
rail. Alternatively, companies can seek out a payment ops solution with expertise in building
to multiple banks and rails. It all depends on whether one wants to spend the capacity and
time on establishing these functionalities, or focusing on core products and strategy.
CHAPTER 4
● Act as a central data store divorced from your underlying fund flow structure (i.e.,
bank account setup, your application data models, or the data and the money you
hold on a third-party system like Stripe);
● Handle scale (as opposed to your ERP and accounting system, which is also
double-entry, but best used for historical reporting, not real-time data handling).
● This infrastructure company and said engineers have a track record of success.
Under these assumptions, building a ledger in-house almost always ends up being more
risky, expensive, and complex than buying.
Does your system accept eventually consistent balance aggregations? Or does your use
case require some level of immediacy on balance updates? How do you deal with the
inherent limitations of the database you use? What kind of concurrency controls do you
need to ensure the ledger is consistent at scale? How do you handle versioning, locking,
and partitioning? These are not trivial issues, and a good vendor tends to have answered all
of these questions with dedicated infrastructure teams.
*Note: The cost assumes $250k / year all-in engineering salaries, assuming $197,204
average total compensation for an engineer in San Francisco and baking in fringe costs
such as benefits and taxes paid by the employer.
Many developers see the task of setting up tables of SQL as trivial. But enforcing
double-entry at the database level requires you to organize the database around three core
objects: accounts, transactions, and entries. Accounts need constraints that
enforce account normality. Transactions need to accommodate two or more entries, and
each entry should include a direction property, defining whether it’s a credit or debit.
On top of this, you need to create rules that will assure credits = debits on a transaction
level. You also need to ensure the ledger features an append-only design (for the sake of
immutability), and you need to create idempotency controls to ensure duplicate
From here, you need to build for scale. Parsing transactions simultaneously, ensuring high
throughput, low latency, and high availability, and implementing locking—these are all
guardrails for any scaling company. Building and testing this could take a team of two
engineers another four to five months. Because of the nature of this problem, the mythical
man-month principle applies here: more engineers don’t necessarily make this faster.
Finally, as you grow, you will inevitably deal with scaling challenges. As we showcased in
how and why ledgers break, more often than not, initial implementation designs fail
overtime, consistency is compromised by scale, refactors become necessary, and as a
result, your cost x time graph ends up looking lopsided, instead of a line.
Risk: the value of keeping your data with a trusted third party
The risk of using an external provider usually takes one of four forms:
● Performance risk (your vendor not performing according to SLAs);
● Data security risk (your vendor losing access to, leaking or being vulnerable to
attacks on very important data);
● Vendor risk (the chance of your provider running out of business);
● Lock-in risk (the inability for you to move vendors if necessary).
We believe that a trustworthy third party can minimize vendor risks while eliminating the
risks of building in-house. At Modern Treasury, for instance, we have ambitious SLIs around
availability, latency, and throughput. We implemented SSO, SOC I and II compliance, RBAC,
data encryption in transit (TLS 1.2) and at rest (AES-256-GCM), IDS, ingress and egress
filtering, and more, to minimize the likelihood of security breaches. Working with some of
the largest fintechs and marketplaces in the world (ClassPass and TripActions, for example)
means our APIs are battle tested. Finally, we don’t believe in locking you in unnecessarily,
so your data can always be exported to your data warehouse of choice.
Some vendors provide similar features; others don’t—what’s important is that you do your
diligence in the process. But working with a trustworthy vendor means you are putting the
three risks of building in-house (human error, scope creep, lack of guidance) under the
scrutiny of a partner who has done this hundreds of times.
| The end result: faster infra → faster products → better companies, out of the box
For many companies, all of this translates into faster product velocity: launching a new
product faster because you will neither have to build—nor maintain—a double-entry ledger
service. Faster time to market means quicker revenue and lower burn. But beyond the initial
launch, outsourcing this undifferentiated part of your stack means peace of mind. Having
engineers focused on your ledger at all times takes time away from your product. And just
like your cloud provider, as your vendor works to continuously improve their infrastructure,
your infrastructure gets better, too.
Get Started
There are a number of challenges facing companies that move money. Being able to
automate and build processes for scale right from the start is a key component to creating
a seamless, easy-to-manage experience for customers and businesses alike.