Class SubAccounts

java.lang.Object
com.flutterwave.services.SubAccounts

public class SubAccounts extends Object
Manage Collection Subaccounts.
Author:
Cleopatra Douglas
  • Constructor Details

    • SubAccounts

      public SubAccounts()
  • Method Details

    • runCreateSubAccounts

      public Response runCreateSubAccounts(CollectionsSubAccountRequest collectionsSubAccountRequest, Optional<PayoutSubAccountRequest> payoutSubAccountRequest, SubAccountTypes type)
      Create a subaccount on Flutterwave.
      Parameters:
      collectionsSubAccountRequest - bean
      payoutSubAccountRequest - bean
      type - COLLECTION or PAYOUT
      Returns:
      Response
    • runGetSubAccounts

      public ListResponse runGetSubAccounts(Optional<String> account_bank, Optional<String> account_number, Optional<String> bank_name, Optional<Integer> page, SubAccountTypes type)
      List all subaccounts on Flutterwave.
      Parameters:
      account_bank - Optional This is the sub-accounts bank ISO code
      account_number - Optional This is the account number associated with the subaccount you want to fetch
      bank_name - Optional This is the name of the bank associated with the ISO code provided in account_bankfield
      page - Optional This is the page number to retrieve e.g. setting 1 retrieves the first page
      type - COLLECTION or PAYOUT
      Returns:
      ListResponse
    • runGetSubAccount

      public Response runGetSubAccount(int id, Optional<String> account_reference, Optional<String> include_limit, SubAccountTypes type)
      Fetch a subaccount on Flutterwave.
      Parameters:
      id - INT This is the unique id of the sub account you want to fetch. It is returned in the call to create a sub account as data.id
      account_reference - Optional The unique reference for the payout
      include_limit - Optional Pass this parameter to ensure the limit for the subaccount are returned in the response
      type - COLLECTION or PAYOUT
      Returns:
      Response
    • updateSubAccount

      public Response updateSubAccount(int id, UpdateCollectionSubAccountRequest updateCollectionSubAccountRequest, Optional<UpdatePayoutSubAccountRequest> updatePayoutSubAccountRequest, Optional<String> account_reference, SubAccountTypes type)
      Update a collection subaccount on Flutterwave.
      Parameters:
      id - int This is the unique id of the subaccount you want to update. It is returned in the call to create a subaccount as data.id
      updateCollectionSubAccountRequest - bean
      updatePayoutSubAccountRequest - bean
      account_reference - Optional The unique reference for the payout
      type - COLLECTION or PAYOUT
      Returns:
    • runDeleteCollectionSubAccounts

      public Response runDeleteCollectionSubAccounts(int id)
      Delete a collection subaccount on Flutterwave.
      Parameters:
      id - int This is the unique id of the sub account you want to fetch. It is returned in the call to create a sub account as data.id
      Returns:
      Response
    • runGetPayoutSubAccountTransactions

      public Response runGetPayoutSubAccountTransactions(String account_reference, String from, String to, String currency)
      Fetch a transaction on a payout/transfer subaccount on Flutterwave.
      Parameters:
      account_reference - String The unique reference for the payout
      from - String start date
      to - String end date
      currency - String currency of the subaccount. The possible values are USD, EUR, GBP and NGN
      Returns:
      Response
    • runGetPayoutSubAccountBalance

      public Response runGetPayoutSubAccountBalance(String account_reference, String currency)
      Fetch the available balance on a payout/transfer subaccount on Flutterwave.
      Parameters:
      account_reference - String The unique reference for the payout
      currency - String currency of the subaccount. The possible values are USD, EUR, GBP and NGN
      Returns:
      Response
    • runGetPayoutSubAccountStaticVirtualAccount

      public Response runGetPayoutSubAccountStaticVirtualAccount(String account_reference, String currency)
      Fetch a static virtual account on a payout/transfer subaccount on Flutterwave
      Parameters:
      account_reference - String The unique reference for the payout
      currency - String currency of the subaccount. The possible values are USD, EUR, GBP and NGN
      Returns:
      Response