Integrate instant MTN, Airtel, Glo and 9mobile data and airtime into your own platform. Pricing is live — it updates the moment the owner edits or imports new prices.
Get started
Register & fund wallet
Create an account and fund your wallet — purchases are debited from it.
Generate an API key
Create a key from the API Keys page. Copy it immediately — it's shown only once.
Send requests
Pass your key in the x-api-key header on every purchase and balance call.
Reference
Base URL
Auto-detectedhttps://ngdatalink.base44.app/functionsThis is your app's own domain — every clone detects its URL automatically. Reach each endpoint at <base-url>/<function-name>, e.g. https://ngdatalink.base44.app/functions/apiPurchase.
/apiPlansPublicList plans & pricing
Returns every active data plan with its live cost price, grouped by network, plus airtime limits. Use this to look up plan_id values — these are our stable, provider-agnostic IDs that never change.
/apiPurchasex-api-keyBuy data / airtime
Charges your wallet at cost price and delivers data or airtime to the recipient phone. Supports idempotency via request_id.
/apiBalancex-api-keyCheck wallet balance
Returns your current wallet balance in NGN.
Authentication
Every purchase and balance request must include your secret API key in the x-api-key header. Keys are hashed at rest and shown to you only once when created. Revoke and rotate keys anytime from the API Keys page.
x-api-key: nglive_YOUR_SECRET_API_KEYReference
Supported networks
Send the exact purchase.network string below — case-insensitive, uppercased internally. All four networks support both data and airtime.
MTN
MTN Nigeria
AIRTEL
Airtel Ng
GLO
Globacom
9MOBILE
9mobile
Phone number format
Always a 11-digit Nigerian mobile number starting with 070, 080, 081, 090 or 091. Examples: 08031234567, 07061234567. Any other length is rejected.
Data purchase — required fields
POST /apiPurchaseYou're charged the plan's cost price (live value from /apiPlans). The recipient gets the full data bundle.
typerequired"data"Transaction type.
purchase.networkrequiredMTN | AIRTEL | GLO | 9MOBILEOne of the four networks above.
purchase.plan_idrequired1, 2, 3 …A number from GET /apiPlans — our stable per-network ID, not the provider's.
purchase.phonerequired0803123456711-digit Nigerian number on the chosen network.
request_idoptionalreq_1700000001Optional idempotency key — prevents duplicate charges on retry.
Airtime purchase — required fields
POST /apiPurchaseYou're charged 99% of the amount (cost price). The phone is credited with the full face value you request. Amount must be a whole number of naira.
typerequired"airtime"Transaction type.
purchase.networkrequiredMTN | AIRTEL | GLO | 9MOBILEOne of the four networks above.
purchase.amountrequired100 – 50000Whole naira face value the phone receives. You're charged 99%.
purchase.phonerequired0803123456711-digit Nigerian number on the chosen network.
request_idoptionalreq_1700000002Optional idempotency key — prevents duplicate charges on retry.
Every purchase and balance request must also include your secret key in the x-api-key header, and your wallet must hold enough balance to cover the cost price — the call is debited before the provider is contacted.
Pricing
Data Plans
Live cost price · sorted small → big
9MOBILE · 10 plans
500MB (SME)
₦275
cost price
1GB (SME)
₦535
cost price
1.5GB (SME)
₦785
cost price
2GB (SME)
₦1,085
cost price
7.5GB (SME)
₦3,755
cost price
11GB (SME)
₦5,695
cost price
2.3GB
₦1,255
cost price
3.2GB
₦1,555
cost price
4.5GB
₦2,085
cost price
5.2GB
₦2,585
cost price
Airtime
99% cost · full face value delivered
Min ₦100 · Max ₦50,000. The recipient phone is always credited with the full face value you request.
Pricing updates instantly when the owner edits or imports plans.
Examples
type: "data", purchase.network, purchase.plan_id (our stable plan_id from /apiPlans), purchase.phone (11 digits), optional request_id for idempotency.curl -X POST https://ngdatalink.base44.app/functions/apiPurchase \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"type": "data",
"request_id": "req_1700000001",
"purchase": {
"network": "MTN",
"plan_id": "1",
"phone": "08031234567"
}
}'Examples
type: "airtime", purchase.network, purchase.amount (₦100–₦50,000), purchase.phone. You're charged 99% of the amount; the phone gets the full value.curl -X POST https://ngdatalink.base44.app/functions/apiPurchase \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"type": "airtime",
"request_id": "req_1700000002",
"purchase": {
"network": "MTN",
"amount": 500,
"phone": "08031234567"
}
}'Examples
curl -X POST https://ngdatalink.base44.app/functions/apiBalance \
-H "x-api-key: YOUR_API_KEY"Webhooks
Get notified when purchases complete
Set a webhook URL on any of your API keys (from the API Keys page). Whenever a data or airtime purchase made with that key succeeds or fails, we POST a JSON payload to your URL with an HMAC-SHA256 signature so you can verify it's genuinely from us.
Headers
x-webhook-signature: <HMAC-SHA256 of the raw body, hex>
x-webhook-timestamp: 2026-09-05T12:00:00.000Z
content-type: application/jsonPayload
{
"event": "purchase.success",
"transaction_id": "abc123",
"reference": "API-DAT-...",
"request_id": "req_1700000001",
"type": "data",
"network": "MTN",
"phone": "08031234567",
"plan_id": "1",
"plan_name": "1GB SME - 30 days",
"amount": 120,
"status": "success",
"message": "Purchase successful.",
"wallet_balance": 880,
"currency": "NGN",
"timestamp": "2026-09-05T12:00:00.000Z"
}event is purchase.success or purchase.failed. On failure, the wallet has already been refunded.
Verify the signature (Node.js)
import crypto from "crypto";
const raw = await request.text(); // raw body
const sig = request.headers.get("x-webhook-signature");
const expected = crypto
.createHmac("sha256", YOUR_WEBHOOK_SECRET)
.update(raw)
.digest("hex");
if (sig === expected) {
const payload = JSON.parse(raw);
// trust it — update your records
}Always verify the signature with the signing secret shown on your key before acting on a webhook. Compare the raw body (not a re-serialized copy), and reject requests older than 5 minutes.
Response
Success response
{
"success": true,
"status": "success",
"reference": "API-DAT-...",
"transaction_id": "abc123",
"amount": 120,
"wallet_balance": 880
}Error response
{
"success": false,
"message": "Insufficient wallet balance. Fund your wallet to continue.",
"wallet_balance": 50,
"required": 120
}Instant delivery
Orders resolve in seconds
Wallet-based
Fund once, spend per request
Idempotent
request_id prevents duplicate charges