An external system can use the API-method CreateWithdrawalCashOrder to withdraw money from BFS. This article will also show how to work with transfer receivers (found as External Accounts in BFS).
There are two main ways to work with withdrawals, the first is where we want to withdraws money from a customer account to an external account of that customer. This will result in one transaction taking place at our bank for this specific customer. The second alternative is where a transfer for multiple customers should be made to an external account owned by the house. This could occur if we would like to send money to a fund to cover multiple direct customer purchases or if we have another system that works with insurance products and BFS is being used for managing the trading accounts. In this case a transfer would have to occur to another custody account that is not being monitored by BFS.
When using the second alternative there is a setting available on the external account called batch order. By enabling that setting it is now possible to include multiple individual withdrawal orders in a batch withdrawal order to get one transaction done at the bank.
Once the individual withdrawal orders are batched, which can be accomplished manually or through an automated process in BFS, the batch order number can be used on the bank transfer instruction. Once the external system reads the bank instruction and the reference number it can then request the underlying individual orders via the function GetWithdrawalTransferOrders.
If the batch order number is used as an input to GetWithdrawalTransferOrders the method will return an array of each individual withdrawal order that is included in the batch transaction. By using the External Reference on those individual withdrawal orders the external system will get the reference that it used to create those withdrawal orders in the first place.
We are going to use our test customer, John Doe, to send two withdrawal orders using the external account on the house called Fund A in order to simulate a batch transfer to a fund.
The result in the console is the following:
We can see in the GUI that two orders were created for the customer:
By clicking on the information icon we can see that the external account used is the one configured on the house called Fund A.
We now have a choice, either we can process these withdrawals individually or we can create a batch order and process them as one transaction since they are both going to the same external account.
For this example we will create a batch order and associate the withdrawals to this. To create a batch order manually we will do the following:
- Navigate to Order Management
- Select Cash Orders
- Click on the Batch Orders tab
Next we will click on create batch orders in the action menu:
The batch order is now created and appears in the list:
The batch order number 70000076 could now be used with GetWithdrawalTransferOrders to collect the underlying orders.
The next step is to send the instruction to the bank, in this article we will do this manually to change the state of the order to Instructed.
Following this we will enter the execution step where we will enter the settlement date, value date and custody account for the withdrawal.
Looking at the custody account the transactions were made as an aggregate amount, in the same way it was booked in the bank, both in the trade and settlement dimension:
In the customer BFS-account the transactions were booked individually: