Get Virtual Account Transaction
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId} \
--header 'x-api-key: <api-key>'import requests
url = "https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const url = 'https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}';
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyimport Foundation
let url = URL(string: "https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-api-key": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val request = Request.Builder()
.url("https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}")
.get()
.addHeader("x-api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()falsepackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"message": "Transaction fetched successfully",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"remark": "<string>",
"reason": "<string>",
"referenceNumber": "<string>",
"type": "<string>",
"state": "<string>",
"quote": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"currency": "<string>",
"country": "<string>",
"amount": 123
},
"target": {
"currency": "<string>",
"country": "<string>",
"amount": 123
},
"rate": 123,
"fee": {
"amount": 123
}
},
"recipient": {
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"relationship": "<string>",
"type": "<string>",
"account": {
"sortCode": "<string>",
"accountNumber": "<string>"
},
"paymentChannel": "<string>",
"currency": "<string>",
"country": "<string>"
},
"created": "2023-11-07T05:31:56Z",
"processed": "2023-11-07T05:31:56Z"
}
}{
"message": "Invalid API key",
"status": "failed"
}{
"message": "Access denied: IP address not whitelisted",
"status": "failed"
}{
"message": "Invalid parameter",
"status": "failed"
}Virtual Account
Get Virtual Account Transaction
Retrieves the details of a specific transaction associated with a virtual account using its unique ID.
GET
/
v1
/
virtual-account
/
transaction
/
{transactionId}
Get Virtual Account Transaction
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId} \
--header 'x-api-key: <api-key>'import requests
url = "https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const url = 'https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}';
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyimport Foundation
let url = URL(string: "https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-api-key": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val request = Request.Builder()
.url("https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}")
.get()
.addHeader("x-api-key", "<api-key>")
.build()
val response = client.newCall(request).execute()falsepackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandboxapi.me-cash.com/v1/virtual-account/transaction/{transactionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"message": "Transaction fetched successfully",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"remark": "<string>",
"reason": "<string>",
"referenceNumber": "<string>",
"type": "<string>",
"state": "<string>",
"quote": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"currency": "<string>",
"country": "<string>",
"amount": 123
},
"target": {
"currency": "<string>",
"country": "<string>",
"amount": 123
},
"rate": 123,
"fee": {
"amount": 123
}
},
"recipient": {
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"relationship": "<string>",
"type": "<string>",
"account": {
"sortCode": "<string>",
"accountNumber": "<string>"
},
"paymentChannel": "<string>",
"currency": "<string>",
"country": "<string>"
},
"created": "2023-11-07T05:31:56Z",
"processed": "2023-11-07T05:31:56Z"
}
}{
"message": "Invalid API key",
"status": "failed"
}{
"message": "Access denied: IP address not whitelisted",
"status": "failed"
}{
"message": "Invalid parameter",
"status": "failed"
}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 transaction (e.g. 557d936e-e904-4d0d-8d61-f6f1a6abbc03)
Was this page helpful?
⌘I

