We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that.
This describes how to create a collection subaccount
Response flwResponse = new SubAccounts()
.runCreateSubAccounts(
new CollectionsSubAccountRequest("044",
"0690000037",
"Eternal Blue",
"[email protected]",
"Anonymous",
"090890382",
"09087930450",
"NG",
Optional.empty(),
"percentage",
new BigDecimal("0.5")),
Optional.empty(),
COLLECTION);
This describes how to create a payout subaccount
Response flwResponse = new SubAccounts()
.runCreateSubAccounts(payoutSubAccountRequest,
Optional.empty(),
PAYOUT);
This describes how to create a fetch collection subaccounts
Response flwResponse = new SubAccounts()
.runGetSubAccounts(Optional.account_bank,
Optional.account_number,
Optional.bank_name,
Optional.page,
COLLECTION
);
This describes how to create a fetch payout subaccounts
Response flwResponse = new SubAccounts()
.runGetSubAccounts(Optional.empty(),,
Optional.empty(),
Optional.empty(),
Optional.empty(),
Optional.empty(),
PAYOUT
);
This describes how to create a fetch a collection subaccount
Response flwResponse = new SubAccounts()
.runGetSubAccount(id,
Optional.account_reference,
Optional.empty(),
COLLECTION
);
This describes how to create a fetch a collection subaccount
Response flwResponse = new SubAccounts()
.updateSubAccount(id,
updateCollectionSubAccountRequest,
Optional.empty(),
Optional.empty(),
COLLECTION
);
This describes how to create a delete a collection subaccount
Response flwResponse = new SubAccounts()
.runDeleteCollectionSubAccounts(18504);