- Create a sub account
string bankCode = "044"; string accountNumber = "0690000032"; string businessName = "Eternal Blue"; string businessEmail = "[email protected]"; double splitValue = 0.5; string businessContact = "Yemi Desola"; string businessContactMobile = "08012345678"; string businessMobile = "08012345678"; SubAccountResponse response = api.CreateSubAccount(bankCode, accountNumber, businessName, businessEmail, Country.Nigeria, SplitType.Percentage, splitValue, businessContact, businessContactMobile, businessMobile); // success if (response.Status == "success") { // Get sub account SubAccount subAccount = response.Data; } // error else { // Get error message string errorMessage = response.Message; }
- Delete a sub account
int subAccountId = 12345 SubAccountResponse response = api.DeleteSubAccount(subAccountId); // success if (response.Status == "success") { // Get success message string successMessage = response.Message; } // error else { // Get error message string errorMessage = response.Message; }
- Fetch a sub account
int subAccountId = 12345; SubAccountResponse response = api.GetSubAccount(subAccountId); // success if (response.Status == "success") { // Get the sub account SubAccount subAccounts = response.Data; } // error else { // Get error message string errorMessage = response.Message; }
- Fetch all sub accounts
GetSubAccountsResponse response = api.GetSubAccounts(); // success if (response.Status == "success") { // Get all sub accounts List<SubAccount> subAccounts = response.Data; } // error else { // Get error message string errorMessage = response.Message; }
- Update a sub account
int subAccountId = 12345; string businessName = "Eternal Blue"; string businessEmail = "[email protected]"; string bankCode = "044"; string accountNumber = "0690000032"; double splitValue = 0.5; SubAccountResponse response = api.UpdateSubAccountRequest(subAccountId, businessName, businessEmail, bankCode, accountNumber, SplitType.Percentage, splitValue); // success if (response.Status == "success") { // Get updated sub account SubAccount subAccount = response.Data; } // error else { // Get error message string errorMessage = response.Message; }