Announcing new features for real-time, AI-assisted reconciliation. Learn more →


How to Build an Escrow Product

Escrow is a payment setup where the payer sends funds to a third party rather than directly to the payee. If certain conditions are met, the third party routes the funds to the recipient; if not, the funds get returned to the sender. Escrow is particularly useful for high value payments because the payer can rely on the escrow provider as a responsible intermediary of the funds.

Andy QinEngineering

Note: Modern Treasury empowers teams to make payment operations simple, scalable, and secure. The “Guides” series walks through representative businesses or payment processes and explains step by step how best to go about building them from scratch. ‍


Escrow is a payment setup where the payer sends funds to a third party rather than directly to the payee. If certain conditions are met, the third party routes the funds to the recipient; if not, the funds get returned to the sender. Escrow is particularly useful for high value payments because the payer is guaranteed their money back if the payee doesn’t meet the conditions.

Many Americans encounter escrow when they buy or sell a home. In the US, the final step in buying a home is referred to as the “closing process.” While it can vary from state to state, the basic premise is that the buyer delivers the funds to a third party, the seller signs over the deed (or title) to the property, and that third party then transfers the funds to the seller once all the documents are complete. The third party is often referred to as a “title and escrow agent.”

This post takes the sale of a residential home and walks through how to build the flow of funds associated with the escrow process. We hope this guide is useful in demystifying how an escrow company might automate its payment operations using Modern Treasury.

The User Experience

Let’s say you’re building a title and escrow company in the US that helps clients sell their homes online. The user experience steps might look something like this:

  1. Billie Buyer commits to buying a house. Billie will make a 20% down payment in cash and will take out a mortgage for the remaining 80%.
  2. You assign an escrow bank account to the transaction, collect the two incoming wire transfers from Billie Buyer and the lender, and inform the seller when the funds are in your possession.
  3. At that point, Sandy Seller signs over the property.
  4. Once you’ve determined all the documentation is completed correctly, you disburse the full purchase amount to Sandy Seller via wire transfer.

The flow of funds is straightforward: two incoming wire transfers, and one outgoing wire transfer. This can get significantly more complicated if there are multiple sources of funds, or if there are other parties to be paid, such as tax authorities or other settlement agents. But for the sake of clarity, we’ll start with this simple scenario.

Payment Ops Architecture

To start, you should decide on the account structure itself. Escrow accounts have specific legal designations at banks and not all banks offer them. In addition, you should decide whether to use a single bank account for multiple transactions or to use virtual accounts.

Virtual accounts are accounts with unique account numbers within a physical bank account. They are much faster to provision than real bank accounts and guarantee one-to-one reconciliation. For our architecture, using virtual accounts as escrow accounts is ideal because we can create one account per house sale. This helps us segregate funds in our reconciliation, as opposed to mixing the funds of multiple house sales in a single account. Also, single transactions per virtual account create a more manageable audit trail.

Diagram depicting money movement through an escrow virtual account

API Calls and Timings

With our payment ops architecture in hand, we’re ready to build.

Step 1: Assign a Virtual Account to a sale and share numbers with Buyer and Lender

As soon as you learn of an impending house sale, you create a virtual account and share its details with Billie Buyer. You might also generate an invoice for Billie Buyer to share with their mortgage lender, along with specific instructions as to the amount and breakdown to be included in the wires.

To do so, you’d make an Modern Treasury API request like the following:

The response includes the unique routing details for the newly created account. You might also want to add additional information about the sale in the account’s metadata, for example: details about the buyer, seller, property in question, expected close date, any unique arrangements, and other information.

Step 2: Create Expected Payments to monitor the wires you expect to receive

Though not required, it’s useful to create Expected Payments for the two incoming wires you expect to receive. This way, Modern Treasury will notify your system via webhook whether a given payment succeeds within your specified time range, or if it is overdue:

Some banks will notify you in advance of a payment settling in an account. Modern Treasury captures that notification in the form of an Incoming Payment Detail object. Subscribing to Incoming Payment Detail webhooks will be the first indication from the bank that the wires will settle soon.

Step 3: Disburse funds

Once the funds have arrived and the documents have been signed, you can disburse the total amount due to Sandy Seller. Let’s say Sandy Seller is getting $300,000 in net proceeds, which will go out via a single wire. Note that the amount is in cents, not dollars, so it is presented as 30000000:

Once the payment goes through, the account will be debited $300,000 and the transaction will be complete.

Lastly, you want to add metadata to the payment for future reference. In addition to metadata tags (eg. key value pairs such as Type: Residential or State: Colorado) you might also attach the PDF for the legal docs, or the CSV calculating the amounts. This will be useful for finance teams that might have questions about this payment in the future.

That’s it. You have just built a sophisticated payment ops architecture for a house sale with a few API calls.

In reality, of course, things can be more elaborate. Billie Buyer could have multiple sources of funds for the down payment, as they may be receiving funds from family or from a service like Haus. They may also be working with multiple lenders if they have a second mortgage. And depending on the state and county the house is located in, the escrow company may have to disburse funds for sales tax or other fees.

What Can Go Wrong?

Payment operations software, such as Modern Treasury, can manage not only the happy path as described above but also edge cases when things go wrong. A common issue could be that a seller could mistype their bank account details, causing the payment to be returned. Modern Treasury supports account verification with providers like Plaid, so both you and the seller can be confident that funds are routed to the right destination.

Customer service issues are another type of problem that can arise, such as when a lender sends the incorrect amount. In that case, there might be an additional transaction necessary or an explanatory note for future audits. Modern Treasury supports tracking funds using double-entry Ledgers. This way, ops teams can refer to an immutable history of the transaction data, since all money movements are captured and displayed. In the future, accountants and auditors won’t be left wondering about a wire, since contextual information will be tied to the bank statement transaction in question.


This post laid out a simple yet robust foundation for payment ops at an escrow company, leaving plenty of room for future functionality.

For any specific questions, or to see how Modern Treasury can help make your company’s payment ops simple, scalable, and secure, sign up today.

Try Modern Treasury

See how smooth payment operations can be.

Talk to sales

Subscribe to Journal updates

Discover product features and get primers on the payments industry.




Modern Treasury For

Case Studies





Popular Integrations

© Modern Treasury Corp.