ChapaChapa Docs

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.co

Authentication

Headers

NameRequiredDescription
AuthorizationYesBearer <PRIVATE_API_KEY>
Content-TypeNoapplication/json

Path Parameter

ParameterRequiredDescription
virtual_account_idYesUnique virtual account identifier

Example Request

GET https://api.chapa.co/v2/virtual-accounts/VA_ABC123456
Authorization: Bearer CHAPA_TEST_xxxxxxxxxxxxx

Example Response

{
  "status": "success",
  "message": "Virtual account retrieved successfully",
  "data": {
    "virtual_account_id": "VA_ABC123456",
    "account_name": "John Doe 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

FieldTypeDescription
virtual_account_idstringUnique account ID
account_namestringAccount label
currencystringAccount currency
balancenumberCurrent available balance
metaobjectCustom metadata
created_atstringCreation timestamp
updated_atstringLast 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

HTTPError CodeDescription
404NOT_FOUNDVirtual account not found
400INVALID_FORMATInvalid account ID
500PROCESSING_FAILEDFailed to fetch account

Next Steps

On this page