Get transaction
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.datashop.africa/api/v2/transactions/{reference}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.datashop.africa/api/v2/transactions/{reference} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.datashop.africa/api/v2/transactions/{reference}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.datashop.africa/api/v2/transactions/{reference}",
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;
}Transactions
Get transaction
Check one purchase by reference.
GET
/
api
/
v2
/
transactions
/
{reference}
Get transaction
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.datashop.africa/api/v2/transactions/{reference}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.datashop.africa/api/v2/transactions/{reference} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.datashop.africa/api/v2/transactions/{reference}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.datashop.africa/api/v2/transactions/{reference}",
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;
}Check one transaction by the reference supplied at purchase time. Use it when a purchase is processing, when a receipt needs to be refreshed, or when support needs the latest status.
Parameters
string
required
Transaction reference supplied when the purchase was created.
Request
GET /api/v2/transactions/merchant-ref-20260812001
Authorization: Bearer YOUR_API_KEY
Successful response
{
"status": true,
"message": "Transaction fetched successfully.",
"data": {
"reference": "merchant-ref-20260812001",
"service": "data",
"product_name": "mtn-share-weekly-1gb",
"provider": "MTN",
"customer_id": "08030000000",
"paid_amount": 400,
"transaction_status": "successful",
"requery_queued": false
}
}
Failed response
{
"status": false,
"message": "Error message"
}
⌘I