Build with Strongmb.
Integrate airtime, mobile data, electricity and cable TV into your product. Start with one authenticated request, then build a reliable purchase flow.
One key. A straightforward API.
Read your account details without creating a purchase. Use the same authentication pattern across the API.
Understand authenticationcurl --request GET \ --url "https://api.strongmb.ng/v1/user" \ --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/user", {
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);
// For purchases, inspect data.transaction_status before showing a receipt.
}
main().catch(console.error);
<?php
// Requires the PHP cURL extension.
$client = curl_init('https://api.strongmb.ng/v1/user');
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]);
// For purchases, inspect data.transaction_status before showing a receipt.
require 'net/http'
require 'json'
uri = URI('https://api.strongmb.ng/v1/user')
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/user",
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.
Our partners
What are you building?
Sell data bundles
Discover available plans and deliver data to a phone number.
Top up a phone
Retrieve products and send a selected airtime amount.
Pay an electricity bill
Validate the meter, confirm the customer and pay.
Renew a subscription
Verify a smart card before paying for a package.
From request to receipt
Four steps connect your customer’s choice to a confirmed purchase.
-
Authenticate your server
Use your secret key to identify your account. Keep it on your server, never in browser code.
Set up authentication -
Choose the right product
Fetch current products and prices. Confirm the recipient; validate meters and smart cards before payment.
Explore a purchase guide -
Save, then send
Create and save a unique reference before submitting the purchase. Use it to track the same order.
Understand references -
Verify the outcome
Confirm the transaction before issuing a successful receipt. Keep processing orders pending.
Handle transaction updates
Check the original reference before retrying. A processing transaction may still succeed, so keep the order pending until its outcome is confirmed.
Keep building
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.