Get Virtual Account
curl --request GET \
--url https://api.usezentra.com/api/v1/virtual-accounts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usezentra.com/api/v1/virtual-accounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usezentra.com/api/v1/virtual-accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usezentra.com/api/v1/virtual-accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usezentra.com/api/v1/virtual-accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usezentra.com/api/v1/virtual-accounts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usezentra.com/api/v1/virtual-accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "NOT_FOUND",
"message": "Account not found",
"details": null
},
"meta": {
"path": "/api/v1/virtual-accounts/va_missing",
"method": "GET"
}
}
{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication required",
"details": null
},
"meta": {
"path": "/api/v1/virtual-accounts/va_abc123xyz",
"method": "GET"
}
}
Get Virtual Account
GET /api/v1/virtual-accounts/ - Retrieve a virtual account
GET
/
api
/
v1
/
virtual-accounts
/
{id}
Get Virtual Account
curl --request GET \
--url https://api.usezentra.com/api/v1/virtual-accounts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usezentra.com/api/v1/virtual-accounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usezentra.com/api/v1/virtual-accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usezentra.com/api/v1/virtual-accounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usezentra.com/api/v1/virtual-accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usezentra.com/api/v1/virtual-accounts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usezentra.com/api/v1/virtual-accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "NOT_FOUND",
"message": "Account not found",
"details": null
},
"meta": {
"path": "/api/v1/virtual-accounts/va_missing",
"method": "GET"
}
}
{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication required",
"details": null
},
"meta": {
"path": "/api/v1/virtual-accounts/va_abc123xyz",
"method": "GET"
}
}
Retrieve a specific virtual account for the authenticated tenant.
Endpoint
GET /api/v1/virtual-accounts/{id}
Path Parameters
string
required
Virtual account ID.
Response Fields
string
Unique identifier for the virtual account.
string
Tenant that owns the account.
string
Customer assigned to the account.
string
Provider account number.
string
Name on the account.
string
Provider bank code or slug.
string
Human-readable bank name.
string
Provider selected for the account.
string
Current account status.
string
Account type stored by the service.
number
Total inbound amount recorded on this account, in minor units.
number
Number of recorded inbound credits.
object | null
Account metadata.
string | null
Provider expiry timestamp if the account allocation is temporary.
string
ISO 8601 creation timestamp.
string
ISO 8601 last-update timestamp.
Example Request
const account = await client.virtualAccounts.get('va_abc123xyz');
console.log(`Account: ${account.accountNumber}`);
console.log(`Received: ${account.totalReceivedMinor}`);
console.log(`Status: ${account.status}`);
account = client.virtual_accounts.get('va_abc123xyz')
print(f"Account: {account.account_number}")
print(f"Received: {account.total_received_minor}")
print(f"Status: {account.status}")
$account = $client->virtualAccounts->get('va_abc123xyz');
echo "Account: {$account->account_number}\n";
echo "Received: {$account->total_received_minor}\n";
echo "Status: {$account->status}";
curl https://api.usezentra.com/api/v1/virtual-accounts/va_abc123xyz \
-H "Authorization: Bearer YOUR_SECRET_KEY"
Example Response
{
"data": {
"id": "va_abc123xyz",
"tenant_id": "tenant_123",
"customer_id": "cus_1234567890",
"account_number": "0123456789",
"account_name": "John Doe",
"bank_code": "wema-bank",
"bank_name": "Wema Bank",
"provider": "paystack_dva",
"status": "active",
"account_type": "standard",
"total_received_minor": 500000,
"transaction_count": 5,
"metadata": {
"purpose": "collections",
"tier": "premium"
},
"expires_at": null,
"created_at": "2026-03-07T10:30:00Z",
"updated_at": "2026-03-07T15:45:00Z"
},
"meta": {
"timestamp": "2026-03-07T15:45:00Z",
"requestId": "req_123"
}
}
Error Responses
{
"error": {
"code": "NOT_FOUND",
"message": "Account not found",
"details": null
},
"meta": {
"path": "/api/v1/virtual-accounts/va_missing",
"method": "GET"
}
}
{
"error": {
"code": "UNAUTHENTICATED",
"message": "Authentication required",
"details": null
},
"meta": {
"path": "/api/v1/virtual-accounts/va_abc123xyz",
"method": "GET"
}
}
Use Cases
Display Account Details
Display Account Details
Show customers their account number and bank details in your app.
Verify Status
Verify Status
Confirm whether an account is
active, frozen, closed, or expired before presenting it to users.Track Credits
Track Credits
Use
total_received_minor and transaction_count for reporting and reconciliation.Next Steps
List Accounts
View all virtual accounts
Close Account
Close the account
Webhooks
Handle account events
Was this page helpful?