# Bulk settlement

Bulk settlement allows you to use a single bank transfer to fund multiple payouts. It works by splitting the transfer creation/funding and final settlement into two separate processes.

Bulk settlement allows Wise to start processing a transfer before receiving funds from the sending customer, based on the partner's guarantee that the funds will be settled at a fixed future time. This allows Wise to provide a faster service to the sending customer in situations where existing payment networks may have a delay.

This guide explains the different variations and features that can be applied to the bulk settlement process.

## Settlement currency 

Bulk settlement allows you to settle with Wise in a different currency than the currency used in the transfers. Settlement currency determines in which currency you will be settling with Wise. You might do this if you wish to create transfers for your customers in a currency not currently supported by Wise. You would then debit those customers' accounts and convert the funds in bulk to the settlement currency before sending them to Wise to pay for the transfers.

The currency which you create the transfer in is called the `source currency` and the currency which you settle in is called the `settlement currency`.

### Example use case

Wise does not currently support settlement in EGP, but your institution may offer banking in this currency to your customers. In this case, you would allow customers to create transfers from EGP (source currency) to other currencies (target currency) that Wise supports, which Wise enables for your customers accessing Wise from your app. You would debit the EGP from the customer accounts and, at the end of the settlement period, settle for the transfers in another currency that Wise does support, such as USD.

You can do this by setting the `settlementCurrency` field of the [Settlement Journal](/api-reference/bulk-settlement/bulksettlementjournalcreate) request, including an exchange rate (from Source Currency (EGP) to Settlement Currency (USD)) with every transfer in the journal. The rate you choose here should be either unique per transfer, or the same for all transfers, depending on the solution agreed to in your contract with Wise.

You would then calculate the amount owed to Wise in the settlement currency by taking the total of the transfers converted at their attached exchange rate and sending this amount to Wise over the agreed scheme to the details we provide.

## Refund models 

The refund model determines how Wise performs a refund in the event of a bounce back. Wise provides a dew different refund models for partners to choose from, such as:

1. Direct refund to balance (Wise account)
2. Direct refund to sending sustomer's bank account
3. Net settlement (only available for bulk settlement partners)


The bulk settlement model allows refunds for all models and each of the models may require additional requests or fields during certain steps. Each of them will be marked in the different flow sections.

## Bulk settlement transfer flow 

The transfer flow for bulk settlement is similar to the standard Wise transfer flow, with a few differences:

1. Create a quote.
2. Select or create a recipient.
3. Create a refund recipient (*only for Direct Refund to Sending Customer Bank Account*).
4. Get a balance recipient (*only for Direct Refund to Balance*).
5. Create a transfer.
6. Fund the transfer.
7. Send the settlement journal and funds.


## Settlement reference 

The settlement journal request includes a field called `settlementReference`.

The value used in this field should be generated by you in the following format:

Settlement Reference Format
**TPFB + 6-character string**

Example: `TPFB230102`

The 6 characters can be of any value as long as they are always unique.

We recommend including the `settlementDate` if it is a daily settlement, but you may suggest your custom approach as well.

## Implementation advice 

Wise has attempted to guard our settlement journal service against issues that can arise from submitting multiple instances of the same transfer on different settlement days or attempting to retry the same settlement data twice. However, we also recommend that you attempt to defend against such issues.

For example, you should track which transfers you have settled with us already and not re-submit them. If desired, you can settle different sets of transfers in a day using different `settlementReference` fields and references on your payments.

If the settlement endpoint fails, you are safe to retry it with the same dataset but please avoid retrying with a different dataset in case the original attempt actually succeeds.

Submitting invalid data (for example, transfers with negative amounts or missing fields) will result in the entire settlement request being invalidated during transfer settlement. In case Wise can't re-process the file, we will reach out to you to resolve the issue.