Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.33 KB

VirtualAccount.md

File metadata and controls

43 lines (30 loc) · 1.33 KB

VIRTUAL ACCOUNT NUMBERS

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.

Create a virtual account number

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"));

Get a virtual account number

This describes how to fetch a virtual account number using order reference

Response flwResponse = new VirtualAccount()
        .getVirtualAccount(reference);

update BVN

This describes how to update the bvn linked to a virtual account number

Response flwResponse = new VirtualAccount()
        .updateBVN(reference, bvn);