List transactions
List transaction history. Request fields, response examples and integration guidance.
/transactions
Example request
curl --request GET \ --url "https://api.strongmb.ng/v1/transactions" \ --header "Authorization: Bearer $STRONGMB_API_KEY" \ --header "Accept: application/json"
// Server-side Node.js 22+; never expose your key in a browser.
async function main() {
const response = await fetch("https://api.strongmb.ng/v1/transactions", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.STRONGMB_API_KEY}`,
Accept: "application/json"
},
signal: AbortSignal.timeout(30000)
});
const result = await response.json();
console.log(response.status, result);
// Read each transaction status before treating an order as complete.
}
main().catch(console.error);
<?php
// Requires the PHP cURL extension.
$client = curl_init('https://api.strongmb.ng/v1/transactions');
curl_setopt_array($client, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('STRONGMB_API_KEY'),
'Accept: application/json',
],
]);
$raw = curl_exec($client);
if ($raw === false) {
throw new RuntimeException(curl_error($client));
}
$status = curl_getinfo($client, CURLINFO_HTTP_CODE);
curl_close($client);
$result = json_decode($raw, true, 512, JSON_THROW_ON_ERROR);
print_r(['http_status' => $status, 'response' => $result]);
// Read each transaction status before treating an order as complete.
require 'net/http'
require 'json'
uri = URI('https://api.strongmb.ng/v1/transactions')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
http.open_timeout = 10
http.read_timeout = 30
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer ' + ENV.fetch('STRONGMB_API_KEY')
request['Accept'] = 'application/json'
begin
response = http.request(request)
result = JSON.parse(response.body)
puts({ http_status: response.code, response: result }.to_json)
rescue StandardError => error
warn error.message
end
# Reconcile an uncertain purchase before retrying.
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
headers = {
"Authorization": "Bearer " + os.environ["STRONGMB_API_KEY"],
"Accept": "application/json",
}
body = None
request = Request(
"https://api.strongmb.ng/v1/transactions",
data=body, headers=headers, method="GET"
)
try:
with urlopen(request, timeout=30) as response:
result = json.load(response)
print(response.status, result)
except HTTPError as error:
print(error.code, error.read().decode("utf-8"))
except URLError as error:
print("Network error:", error.reason)
# Reconcile an uncertain purchase before retrying.
Returns the most recent transactions for the authenticated user.
{
"status": true,
"message": "Transactions retrieved successfully",
"data": {
"count": 50,
"transactions": [
{
"uuid": "72f69533-5f11-45d6-8f26-a553f890b277",
"wallet_type": "primary_ngn",
"direction": "debit",
"type": "airtime",
"amount": "99.00",
"balance_before": 44114,
"balance_after": 44015,
"status": "successful",
"date": "2026-03-18 02:26:38+01",
"reference": "SMBD260aa1352a53aaa7sFAC9",
"details": {
"provider": "mtn",
"recipient": "0123456789",
"airtime_amount": 100,
"performed_via": "api"
}
}
]
},
"metadata": {
"code": "TRANSACTIONS_RETRIEVED",
"timestamp": 1773797290,
"trace_id": "DF008819CD"
}
}
{
"status": false,
"message": "No transactions found.",
"data": null,
"metadata": {
"code": "ERR_TRANSACTIONS_NOT_FOUND",
"timestamp": 1773797291,
"trace_id": "FF009820DE"
}
}
Response fields and types
Expand an object to explore its fields. [] indicates an array item. Error responses may return
data: null.
| Field path | JSON type | Meaning and handling |
|---|---|---|
status |
boolean | Request-level success flag. Check the HTTP status and metadata code as well; a successful API request is not by itself proof of purchase fulfillment. |
message |
string | Human-readable description of the result. Use metadata.code for programmatic error handling instead of parsing this text. |
data |
null | object | Response data. Check the result before reading nested fields; an error may return null or validation details. |
data.count |
integer | Number of records returned in this response, not a guarantee of the account’s total history size. |
data.transactions |
array | Array of transaction records. The current history endpoint returns up to 50 recent entries. |
data.transactions[] |
object | One entry in the transactions array. Its nested fields are documented below. |
data.transactions[].uuid |
string | Internal transaction UUID returned for identification. Use the original purchase reference in the documented lookup route. |
data.transactions[].wallet_type |
string | Wallet on which this transaction occurred, such as primary_ngn. |
data.transactions[].direction |
string | Wallet movement direction, such as debit or credit. |
data.transactions[].type |
string | Service or transaction type, for example data, airtime, electricity or cable TV. |
data.transactions[].amount |
string | Transaction amount formatted as a decimal string with two decimal places. Preserve precision when comparing it with your saved order. |
data.transactions[].balance_before |
number | Wallet balance before this transaction, as reported by the API. |
data.transactions[].balance_after |
number | Wallet balance after this transaction, as reported by the API. |
data.transactions[].status |
string | Record status: successful, processing, failed or refund. A failed purchase is refunded immediately; refund identifies its refund credit and confirms the purchase failed and was refunded. Check direction and UUID to distinguish entries. |
data.transactions[].date |
string | Transaction date/time string returned for display. |
data.transactions[].reference |
string | Reference supplied when creating the purchase. Save it and use the same value for transaction verification. |
data.transactions[].details |
object | Transaction details for the purchased service. Fields vary by service. |
data.transactions[].details.provider |
string | Provider identifier associated with the purchased service. |
data.transactions[].details.recipient |
string | Phone number, meter or customer identifier for the purchase. Compare it with the intended recipient. |
data.transactions[].details.airtime_amount |
number | Face value of the requested airtime. It can differ from the amount debited when a discount applies. |
data.transactions[].details.performed_via |
string | Channel through which the transaction was performed, such as the API. |
metadata |
object | Diagnostic information about the response. |
metadata.code |
string | Machine-readable result code. Use it to distinguish validation, authentication and service errors. |
metadata.timestamp |
integer | Unix timestamp in seconds associated with the response. |
metadata.trace_id |
string | Correlation identifier for troubleshooting. Retain it with a redacted request when contacting support. |
data.transactions[].category |
string | Transaction category as reported by the transaction record. |
data.transactions[].description |
string | Human-readable transaction description. |
For data, airtime, cable TV and electricity fields nested in each transaction, see service-specific transaction details.
Customer names, phone numbers, meter and smart-card numbers in these examples are fictional placeholders. Replace them with valid customer details for real requests.
Always check metadata.code; do not rely on HTTP status alone. See response codes and recommended
handling.
Refund records
When a purchase returns data.status: failed, Strongmb has immediately issued the refund to your
Strongmb wallet. A later GET /transactions/{reference} lookup may return
data.transaction.status: refund. This means the purchase failed and was refunded; it is not a
pending refund or a successful purchase. Strongmb sends the refund notification as
transaction.refunded.
Do not wait for the refund webhook to interpret an authenticated failed purchase response as refunded, and do
not issue another Strongmb wallet refund. Keep your own customer ledger consistent and apply each adjustment
only once. This applies to a confirmed transaction status, not a validation error, timeout or
processing response.
A failed purchase and its refund are separate records. The purchase has direction: debit and
status: failed; the refund has direction: credit and status: refund.
They share the original reference but have different transaction UUIDs. Use UUIDs to distinguish entries and
the reference to associate them with your order.
Do not treat a refund credit as purchase fulfillment or refund it again. The related webhook event is
transaction.refunded. See refund event handling.
Questions? Let’s work through them.
Having an issue or need help with your integration? Join the Strongmb Slack community to ask questions and get assistance from our team and other developers.
Keep API keys and customer details private when sharing examples.
Experiencing a service issue? Check Strongmb’s service status for incident updates.
Did this page help you?
Up to 100 characters. Please leave out personal details, account information and API keys.