Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
themeRDark
titleC# - Create a Withdrawal Cash Order in a BFS instance
collapsetrue
//Create two withdrawals with the CreateDirectBankWithdrawalOrders method
            var client = new BFSServiceReference.bfsapiSoapClient();

var credentials = new BFSServiceReference.Credentials()
{
    UserName = bfsusername, //Username of administrative user in your instance of BFS
    Password = bfspassword, //Password of the administrative user in your instance of BFS
};

var response = client.CreateDirectBankWithdrawalOrders(new BFSServiceReference.CreateDirectBankWithdrawalOrderRequest()
{
    Credentials = credentials,

    identify = bfsidentifier, //Identifier is a unique token for your instance of BFS        

    Entities = new[]
    {
        new DirectBankWithdrawalOrder()
        {
            Account = Guid("2c9ca11e-22a4-4715-b13a-cbb7eca5ee65"),
            Amount = 100,
            CashCurrencyCode= "SEK",
            ExternalReference = "Test1",
            TransferReceiver = new Guid("28dcb516-1a64-42d6-a886-b83bde5e81bf")
        },
        new DirectBankWithdrawalOrder()
        {
            Account = Guid("e7dd5b20-1909-47d8-9d2e-12b0835d3d96"),
            Amount = 110,
            CashCurrencyCode= "SEK",
            ExternalReference = "Test2",
            TransferReceiver = new Guid("28dcb516-1a64-42d6-a886-b83bde5e81bf")
        }
    }

});

foreach (var c in response.Entities)
{
    Console.WriteLine("OrderNo of the created order: " + c.OrderNo);
}

Blog Posts
sortcreation
contenttitles
labelscreatewithdrawalcashorder