## Overview

[Expected Payments](🔗) can be used to automatically reconcile and account for incoming, unoriginated payments. Combined with their [Expected Payment Webhooks](🔗), they enable you to automate workflows around incoming payments.

In some cases, you may want to test Expected Payment reconciliation in your sandbox. The following guide will step you through how to accomplish this assuming you already know how to [authenticate to the API](🔗).

## 1. Create an Expected Payment

Sandbox Banks

Please note that in order to test this flow, you must use one of your pre-loaded Iron Bank of Bravos (IBB) internal accounts when creating the expected payment. If you use another internal account such as Gringotts Wizarding Bank, a matching transaction will automatically be created for the expected payment. IBB allows you to simulate the payment/transaction coming in some time after the creation of the expected payment.

[Create an Expected Payment](🔗) using the API or dashboard ensuring you use an Iron Bank of Bravos internal account (see notice above). You can specify various filters for the expected payment in order to accurately match incoming payment transactions.

## 2. Simulate an Incoming Payment Detail

The next step is to [Simulating an Incoming Payment Detail](🔗). Depending on what you are testing, ensure that the criteria specified on the expected payment from step 1 matches the attributes of the incoming payment detail.

Transaction Description

Please note that at this time it is not possible to test statement descriptor matching. The statement description is an attribute of the Transaction and _not_ the Incoming Payment Detail.

## 3. Wait for Transaction

Once the Incoming Payment Detail is created, a few moments later a [Transaction](🔗) will automatically be created and associated to the IPD.

When the transaction is created, Modern Treasury's reconciliation engine will start the process of matching against the various payment objects. If the expected payment matches, it will be associated to the IPD through the newly created transaction.

## 4. Monitor for Webhook Events

For all these objects, webhook events will be emitted. In particular, you can monitor [Expected Payment Webhooks](🔗) to know when incoming payments have arrived.