API reference

Get a transaction

Retrieve a transaction using the reference you supplied when making the purchase. Request fields, response examples and integration guidance.

GET /transactions/{reference}

Example request

Server-side HTTP request
curl --request GET \
  --url "https://api.strongmb.ng/v1/transactions/SMB202609160001" \
  --header "Authorization: Bearer $STRONGMB_API_KEY" \
  --header "Accept: application/json"

Returns a single transaction belonging to your account that matches your purchase reference.

Path Parameter

Parameter Type Required Description
reference string Required The exact reference you supplied when creating the purchase, for example SMB202609160001.
JSON Response
{
  "status": true,
  "message": "Transaction details retrieved successfully",
  "data": {
    "transaction": {
      "uuid": "06f2dd34-2f8c-4888-9529-6fd5dfabc7fa",
      "wallet_type": "primary_ngn",
      "direction": "debit",
      "category": "product",
      "type": "data",
      "amount": "1500.00",
      "balance_before": "886959.56",
      "balance_after": "885459.56",
      "description": "-",
      "reference": "1SMsaadkj3hd5fdaaaa1fahaa",
      "status": "successful",
      "date": "2026-09-21 00:51:37.909298+01",
      "details": {
        "plan": "5gb",
        "provider": "airtel",
        "recipient": "0123456789",
        "data_type": "gifting",
        "validity": "2days",
        "title": "5gb airtel gifting data",
        "performed_via": "api"
      }
    }
  },
  "metadata": {
    "code": "TRANSACTION_DETAILS_RETRIEVED",
    "timestamp": 1789948330,
    "trace_id": "C7D4777240"
  }
}
JSON Response
{
  "status": false,
  "message": "Transaction not found.",
  "data": null,
  "metadata": {
    "code": "ERR_TRANSACTIONS_NOT_FOUND",
    "timestamp": 1773797291,
    "trace_id": "FF009820DE"
  }
}

Understand the request fields

Field Integration guidance
reference Supply the same reference you saved and sent with the purchase request.

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 Endpoint payload on a completed request. Error responses may return null or validation information.
data.transaction object Single transaction matched by the supplied purchase reference.
data.transaction.uuid string Internal transaction UUID returned for identification. Use the original purchase reference in the documented lookup route.
data.transaction.wallet_type string Wallet on which this transaction occurred, such as primary_ngn.
data.transaction.direction string Wallet movement direction, such as debit or credit.
data.transaction.type string Service or transaction type, for example data, airtime, electricity or cable TV.
data.transaction.amount string Transaction amount formatted as a decimal string with two decimal places. Preserve precision when comparing it with your saved order.
data.transaction.balance_before number Wallet balance before this transactionI.
data.transaction.balance_after number Wallet balance after this transaction.
data.transaction.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.transaction.date string Transaction date/time string returned for display.
data.transaction.reference string Reference supplied when creating the purchase.
data.transaction.details object Transaction details for the purchased service. Fields vary by service.
data.transaction.details.provider string Provider identifier associated with the purchased service.
data.transaction.details.recipient string Phone number, meter or customer identifier for the purchase. Compare it with the intended recipient.
data.transaction.details.airtime_amount number Face value of the requested airtime. It can differ from the amount debited when a discount applies.
data.transaction.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.transaction.category string Transaction category as reported by the transaction record.
data.transaction.description string Human-readable transaction description.

Electricity: prepaid and postpaid lookup

Always query GET /transactions/{reference} to retrieve prepaid token details; they are not returned in the initial purchase response. The sample customer number and token below are fictional placeholders.

Prepaid transaction

JSON response
{
  "status": true,
  "message": "Transaction details retrieved successfully",
  "data": {
    "transaction": {
      "uuid": "a2400382-dbdd-4e7a-a31c-932275aa4d7a",
      "wallet_type": "primary_ngn",
      "direction": "debit",
      "category": "product",
      "type": "electricity",
      "amount": "1100.00",
      "balance_before": "508224.56",
      "balance_after": "507124.56",
      "description": "-",
      "reference": "SMBD0113s53pafssdsddskjsd9",
      "status": "successful",
      "date": "2026-09-25 02:05:17.048527+01",
      "details": {
        "provider": "kedco",
        "recipient": "0123456789",
        "fee": "100.00",
        "currency": "NGN",
        "amount_paid": "1100.00",
        "amount_subscribe": "1000.00",
        "recipient_name": "Strongmb User",
        "title": "kedco Subscription",
        "performed_via": "api",
        "meter_type": "prepaid",
        "units": "55.9",
        "token": "00000000000000000000",
        "meter_number": "0123456789"
      }
    }
  },
  "metadata": {
    "code": "TRANSACTION_DETAILS_RETRIEVED",
    "timestamp": 1790298369,
    "trace_id": "2A00A65871"
  }
}

Postpaid transaction

Postpaid payments do not require a recharge token, so token and units are null.

JSON response
{
  "status": true,
  "message": "Transaction details retrieved successfully",
  "data": {
    "transaction": {
      "uuid": "a2400382-dbdd-4e7a-a31c-932275aa4d7a",
      "wallet_type": "primary_ngn",
      "direction": "debit",
      "category": "product",
      "type": "electricity",
      "amount": "1100.00",
      "balance_before": "508224.56",
      "balance_after": "507124.56",
      "description": "-",
      "reference": "SMBD0113s53pafssdsddskjsd9",
      "status": "successful",
      "date": "2026-09-25 02:05:17.048527+01",
      "details": {
        "provider": "kedco",
        "recipient": "0123456789",
        "fee": "100.00",
        "currency": "NGN",
        "amount_paid": "1100.00",
        "amount_subscribe": "1000.00",
        "recipient_name": "Strongmb User",
        "title": "kedco Subscription",
        "performed_via": "api",
        "meter_type": "postpaid",
        "units": null,
        "token": null,
        "meter_number": "0123456789"
      }
    }
  },
  "metadata": {
    "code": "TRANSACTION_DETAILS_RETRIEVED",
    "timestamp": 1790298369,
    "trace_id": "2A00A65871"
  }
}

Service-specific transaction details

The fields inside data.transaction.details depend on the transaction type. In transaction history, the equivalent path is data.transactions[].details. Provider-dependent values may be unavailable or represented by a placeholder.

Common service fields

Field inside details Type Description
provider string Service provider identifier.
recipient string Phone number, meter or smart-card identifier for the order.
title string Display title for the receipt.
performed_via string Channel used for the transaction, for example API.

Data

Field inside details Type Description
plan string Purchased data plan label.
data_type string Data type purchased.
validity string Data-plan validity label.

Airtime

Field inside details Type Description
airtime_type string Airtime type.
airtime_amount integer Airtime face value; may differ from the debited amount.

Cable TV

Field inside details Type Description
fee string Additional fee as a decimal string.
currency string Currency code.
amount_paid string Paid amount as a decimal string.
package_amount string Package amount as a decimal string.
recipient_name string Customer name when available; a placeholder may be returned.
package_name string Purchased cable package label.

Electricity

Field inside details Type Description
fee string Additional fee as a decimal string.
currency string Currency code.
amount_paid string Paid amount as a decimal string.
amount_subscribe string Electricity subscription amount as a decimal string.
recipient_name string Customer name when available.
meter_type string Prepaid or postpaid meter category.
meter_number string Meter number returned in purchase details.
units string | null Electricity units returned by transaction lookup for prepaid.
token string | null Prepaid recharge token retrieved through transaction lookup; null for postpaid. The initial purchase response does not include this token.

Transaction error codes

ERR_REFERENCE_ALREADY_EXISTS
A transaction already has this exact reference. Verify that transaction before deciding whether to create a new purchase with another reference.
ERR_INVALID_PRODUCT_CODE_OR_INACTIVE
The product code submitted for purchase is invalid or inactive. Retrieve the current products and choose an active product before retrying.
ERR_TRANSACTIONS_NOT_FOUND
The reference does not exist in the authenticated user account. Check the original reference, account and environment.

Customer names, phone numbers, meter and smart-card numbers in these examples are fictional placeholders. Replace them with valid customer details for real requests.

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.

Join our Slack community

Did this page help you?

Search documentation