Get Virtual Account
Retrieve the details and current balance of a virtual account.
The Get Virtual Account endpoint allows you to retrieve the details of a previously created virtual account.
Use this endpoint to:
- Check the current balance
- Fetch account metadata
- Validate account existence and currency
- Display wallet information in your application
Endpoint
GET /v2/virtual-accounts/{virtual_account_id}
Host: api.chapa.coAuthentication
Headers
| Name | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PRIVATE_API_KEY> |
Content-Type | No | application/json |
Path Parameter
| Parameter | Required | Description |
|---|---|---|
virtual_account_id | Yes | Unique virtual account identifier |
Example Request
Example Request
cURL
curl -X GET https://api.chapa.co/v2/virtual-accounts/VA_ABC123456 \
-H "Authorization: Bearer CHAPA_TEST_xxxxxxxxxxxxx"JavaScript
const response = await fetch("https://api.chapa.co/v2/virtual-accounts/VA_ABC123456", {
method: "GET",
headers: {
"Authorization": "Bearer CHAPA_TEST_xxxxxxxxxxxxx"
}
});
const data = await response.json();
console.log(data);Example Response
{
"status": "success",
"message": "Virtual account retrieved successfully",
"data": {
"virtual_account_id": "VA_ABC123456",
"account_name": "Abebe Bikila Wallet",
"currency": "ETB",
"balance": 12500,
"meta": {
"customer_id": "CUST_12345"
},
"created_at": "2025-11-07T10:00:00Z",
"updated_at": "2025-11-07T12:30:00Z"
}
}Response Fields
Virtual Account Object
| Field | Type | Description |
|---|---|---|
virtual_account_id | string | Unique account ID |
account_name | string | Account label |
currency | string | Account currency |
balance | number | Current available balance |
meta | object | Custom metadata |
created_at | string | Creation timestamp |
updated_at | string | Last update timestamp |
Common Use Cases
Display Wallet Balance
- Show real-time balance to users
- Update after deposits or deductions
Validation
- Ensure the account exists before debiting
- Confirm currency compatibility
Reconciliation
- Compare your internal ledger with Chapa balance
Best Practices
- Cache account details if accessed frequently
- Always re-fetch balance before deductions
- Handle zero-balance scenarios gracefully
- Secure virtual account identifiers
Common Errors
| HTTP | Error Code | Description |
|---|---|---|
| 404 | NOT_FOUND | Virtual account not found |
| 400 | INVALID_FORMAT | Invalid account ID |
| 500 | PROCESSING_FAILED | Failed to fetch account |
Next Steps
- Create Virtual Account - Create a new account
- Deposit to Virtual Account - Add funds
- Deduct from Virtual Account - Withdraw funds