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 virtual account number
Note: BVN is required for creating static account numbers in the Live Environment i.e if the value of is_permanent is True. Kindly visit our API section found here for more information.
Response flwResponse = new VirtualAccount()
.runTransaction(new VirtualAccountRequest("[email protected]",
Optional.of("12345678901"),
Optional.of(new BigDecimal("10")),
"VA12",
Optional.of(true),
"Angela"));
This describes how to fetch a virtual account number using order reference
Response flwResponse = new VirtualAccount()
.getVirtualAccount(reference);
This describes how to update the bvn linked to a virtual account number
Response flwResponse = new VirtualAccount()
.updateBVN(reference, bvn);