-
Notifications
You must be signed in to change notification settings - Fork 20
Virtual Account
Abraham Olaobaju edited this page Aug 23, 2023
·
2 revisions
Create Virtual Account Numbers for your Users
use Flutterwave\Service\VirtualAccount;
$service = new VirtualAccount();
$payload = [
"email" => "[email protected]",
"bvn" => "12345678901",
];
$response = $service->create($payload);
print_r($response);
Fetch a virtual account number using order reference
use Flutterwave\Service\VirtualAccount;
$service = new VirtualAccount();
$payload = [
"email" => "[email protected]",
"bvn" => "12345678901",
"tx_ref" => "kenny-".time()
];
$response = $service->createBulk(($payload);
print_r($response);
Get bulk virtual accounts using the batch ID. This is the batch ID returned in the bulk virtual account numbers creation.
$batch_id= 'RND_2641579516055928';
$service = new VirtualAccount();
$response = $service->getBulk($batch_id);
print_r($response);
use Flutterwave\Service\VirtualAccount;
$order_ref = 'RND_2641579516055928';
$service = new VirtualAccount();
$response = $service->get($order_ref);
print_r($response);
update the BVN of previously created virtual accounts.
use Flutterwave\Service\VirtualAccount;
$payload = [
"order_ref" => "RND_2641579516055928",
"bvn" => "1234567890"
];
$service = new VirtualAccount();
$response = $service->update($payload);
print_r($response);
Permanently delete a virtual card.
use Flutterwave\Service\VirtualAccount;
$order_ref = 'RND_2641579516055928';
$service = new VirtualAccount();
$response = $service->delete($order_ref);
print_r($response);