Get Virtual Account Details
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://sandboxapi.me-cash.com/v1/virtual-account/{VirtualAccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "virtual account fetched successfully",
"status": "success",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"bvn": "<string>",
"reference": "<string>",
"account": {
"name": "<string>",
"bankName": "<string>",
"sortCode": "<string>",
"number": "<string>"
},
"status": "<string>",
"currency": "<string>",
"country": "<string>",
"isPermanent": true,
"expiryTime": 123,
"created": "2023-11-07T05:31:56Z",
"expired": "2023-11-07T05:31:56Z"
}
}Virtual Account
Get Virtual Account
Retrieves the details of a specific virtual account by its unique identifier.
GET
/
v1
/
virtual-account
/
{VirtualAccountId}
Get Virtual Account Details
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://sandboxapi.me-cash.com/v1/virtual-account/{VirtualAccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "virtual account fetched successfully",
"status": "success",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"bvn": "<string>",
"reference": "<string>",
"account": {
"name": "<string>",
"bankName": "<string>",
"sortCode": "<string>",
"number": "<string>"
},
"status": "<string>",
"currency": "<string>",
"country": "<string>",
"isPermanent": true,
"expiryTime": 123,
"created": "2023-11-07T05:31:56Z",
"expired": "2023-11-07T05:31:56Z"
}
}Error responses
These are the standard failures forGET /v1/virtual-account/{virtualAccountId}.
| Status | Message | What it means | How to fix |
|---|---|---|---|
| 401 | API key missing or incorrect | Authentication header is missing, invalid, or expired. | Send the right x-api-key for your workspace/environment. |
| 404 | Virtual account ID not found | The ID does not exist or is outside your workspace. | Double-check you are using an ID returned by the creation endpoints. |
| 500 | Service temporarily unavailable | Backend system/dataset failure prevented the lookup. | Retry with backoff and contact support if it persists. |
Authorizations
Path Parameters
The unique identifier of the virtual account.
Was this page helpful?
⌘I

