Sell data, airtime, electricity, cable TV and exam PINs from your own website or app. Every order is paid from your Jewel Data Sub wallet at your API User prices. You send simple JSON requests and get JSON back.
Base URL: https://jeweldatasub.com.ng/api/v1
Already using a script for Alrahuz, Masuddata or Legit Data Way? Change the base URL to https://jeweldatasub.com.ng/api and use your Jewel Data Sub API key. See how.
jds_live_xxxxxxxxxxxxxxxx and it is shown only once. We keep only a hash of it, so we cannot show it again. If you lose it, revoke it and create a new one.| Scope | What it allows |
|---|---|
balance:read | See wallet balance |
catalogue:read | See plans and prices |
orders:read | See orders |
orders:create | Place orders (spends wallet money) |
A request that needs a scope your key does not have gets 403 missing_scope.
When you add IP addresses to a key, only requests from those exact IPs are accepted. Any other IP gets 403 ip_not_allowed. Leave it empty to allow any IP, but we strongly advise you to add your server IP.
orders:create can spend your wallet. You can have up to 5 active keys. Revoking a key stops it at once.Send your key in the Authorization header of every request. Also send Accept: application/json so that errors always come back as JSON.
Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx Accept: application/json Content-Type: application/json
Quick test:
curl https://jeweldatasub.com.ng/api/v1/balance \ -H "Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx" \ -H "Accept: application/json"
Requests go over HTTPS only. API keys do not need your transaction PIN to buy.
{
"ok": true,
"data": { ... }
}{
"ok": false,
"error": {
"code": "insufficient_balance",
"message": "Your wallet balance is not enough for this purchase."
}
}Always check ok first. Use error.code in your code (it does not change). Show error.message to people (it is written for customers).
When a field is missing or has the wrong type, the answer has a different shape. It lists each bad field:
{
"message": "The product id field is required.",
"errors": {
"product_id": ["The product id field is required."]
}
}
| Code | Meaning |
|---|---|
| 200 | OK. Also returned when you repeat an order with the same Idempotency-Key. |
| 201 | A new order was created. |
| 401 | Missing, wrong or revoked key. |
| 403 | IP not allowed, scope missing or account suspended. |
| 404 | Not found (unknown order or service). |
| 422 | The request is not valid, or a business rule stopped it (for example, low balance). |
| 429 | Too many requests. Slow down and try again after the Retry-After seconds. |
| 503 | The API, the service or the plan is switched off for now. Try again later. |
| error.code | HTTP | What to do |
|---|---|---|
invalid_api_key | 401 | Check the key. It may be wrong or revoked. |
unauthenticated | 401 | No key was sent, or it does not start with jds_live_. |
ip_not_allowed | 403 | Add your server IP to the key, or call from an allowed IP. |
missing_scope | 403 | Create a key with the needed scope. |
account_suspended | 403 | Contact support. |
not_found | 404 | No order with that reference on your account. |
unknown_service | 404 | Use one of the service codes in the codes table. |
missing_idempotency_key | 422 | Send an Idempotency-Key header. See Idempotency-Key. |
invalid_amount | 422 | Send a naira string like "500" inside the plan's min and max. |
invalid_recipient | 422 | Phone, meter or smartcard number is not valid. |
invalid_product | 422 | Validation: the product_id is not an electricity (meter) or cable (smartcard) plan. |
insufficient_balance | 422 | Fund your wallet. |
limit_exceeded | 422 | The order is above the maximum for one order. |
daily_limit | 422 | You reached your daily spending limit. Contact support to raise it. |
service_off | 503 | The service or plan is switched off. Try again later or pick another plan. |
service_unavailable | 503 | The plan does not exist or has no working provider now. |
api_disabled | 503 | The whole API is switched off for now. |
"amount": "500" or "1500.50". A JSON number like 500 is refused."amount_kobo": 50000) and naira as a string with two decimals ("amount": "500.00"). 100 kobo = ₦1._kobo are always kobo. Use kobo for sums to avoid rounding errors.| What | Limit |
|---|---|
| All API requests | 120 a minute for each key |
Placing orders (POST /orders) | 20 a minute for each account (all your keys together) |
Above the limit you get HTTP 429. Wait for the number of seconds in the Retry-After header. Use webhooks instead of checking order status in a fast loop.
/meNo scope neededYour account details. Good for checking that your key works.
curl https://jeweldatasub.com.ng/api/v1/me \ -H "Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx" -H "Accept: application/json"
{
"ok": true,
"data": {
"name": "Ada Okafor",
"email": "ada@example.com",
"phone": "+2348031234567",
"level": "api",
"email_verified": true,
"pin_set": true,
"referral_code": "ADA123",
"two_factor": false
}
}
/balancebalance:readYour wallet balances. Orders are paid from main.
curl https://jeweldatasub.com.ng/api/v1/balance \ -H "Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx" -H "Accept: application/json"
{
"ok": true,
"data": {
"main": { "kobo": 2500000, "naira": "25000.00" },
"cashback": { "kobo": 15000, "naira": "150.00" },
"referral": { "kobo": 0, "naira": "0.00" }
}
}
/virtual-accountsNo scope neededYour bank account numbers for funding your wallet by bank transfer.
{
"ok": true,
"data": [
{ "bank": "9PSB", "account_number": "5030000000", "account_name": "JDS - Ada Okafor" }
]
}
/fundingsbalance:readYour wallet funding history, newest first, 25 per page.
| Query | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number. Starts at 1. |
{
"ok": true,
"data": {
"items": [
{
"reference": "FND-261018-K2M8Q1ZP",
"method": "bank_transfer",
"amount_kobo": 500000,
"fee_kobo": 5000,
"credited_kobo": 495000,
"status": "successful",
"created_at": "2026-10-18T09:12:44+01:00"
}
],
"page": 1,
"pages": 3
}
}
/servicesNo scope neededAll services with their network or biller codes. amount_based is true when you send an amount (airtime and electricity).
{
"ok": true,
"data": [
{
"service": "data",
"name": "Data",
"networks": { "mtn": "MTN", "airtel": "Airtel", "glo": "Glo", "9mobile": "T2 Mobile" },
"amount_based": false
},
...
]
}
/services/{service}/planscatalogue:readPlans you can buy, with your prices. Use product_id when you buy. Prices can change, so load this list often (for example, once an hour) instead of saving it forever.
| Name | Type | Required | Description |
|---|---|---|---|
service (path) | string | Yes | data, airtime, electricity, cable or exam. |
network (query) | string | No | Only this network or biller, for example mtn or ikedc. |
category (query) | string | No | Data only: just one data type, for example SME, GIFTING or CG. |
curl "https://jeweldatasub.com.ng/api/v1/services/data/plans?network=mtn&category=SME" \ -H "Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx" -H "Accept: application/json"
There are two kinds of plan:
"kind": "fixed" (data, cable, exam): the price is set. See price_kobo and price."kind": "amount" (airtime, electricity): you choose the amount between min_kobo and max_kobo. You pay the amount minus discount_percent, plus fee_kobo.For data, category is the data type, for example SME, CG (corporate gifting), GIFTING or DIRECT. Group plans by it to show "MTN, then SME, then the SME plans".
{
"ok": true,
"data": [
{
"product_id": 12,
"network": "mtn",
"category": "SME",
"name": "1GB",
"validity": "30 days",
"kind": "fixed",
"price_kobo": 26000,
"price": "260.00",
"discount_percent": null,
"fee_kobo": null,
"min_kobo": null,
"max_kobo": null
},
{
"product_id": 40,
"network": "mtn",
"category": null,
"name": "MTN Airtime",
"validity": null,
"kind": "amount",
"price_kobo": null,
"price": null,
"discount_percent": 2.5,
"fee_kobo": 0,
"min_kobo": 5000,
"max_kobo": 5000000
}
]
}
The second item is from /services/airtime/plans. Airtime, electricity and exam PINs have one plan for each network, biller or exam body.
/validate/{type}catalogue:readCheck a meter number or a smartcard (IUC) number and get the customer's name before you buy. {type} is meter or smartcard.
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | Yes | An electricity plan (for meter) or a cable plan (for smartcard). |
number | string | Yes | Meter number (6 to 13 digits) or smartcard number (8 to 12 digits). |
meter_type | string | No | prepaid (default) or postpaid. Meter only. |
curl -X POST https://jeweldatasub.com.ng/api/v1/validate/meter \
-H "Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-d '{"product_id": 51, "number": "45012345678", "meter_type": "prepaid"}'
{
"ok": true,
"data": {
"ok": true,
"name": "ADEBAYO JOHNSON",
"address": "12 Allen Avenue, Ikeja",
"message": null
}
}
data.ok. If the number could not be confirmed, the request still succeeds but data.ok is false, data.name is null and data.message says why. Do not buy in that case./ordersorders:createBuy something. Your wallet is charged at once. If the order fails, the money goes back to your wallet automatically.
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key (header) | string | Yes | Your own unique ID for this order. 8 to 80 characters: letters, numbers, - _ : . You can send it as request_id in the body instead. |
product_id | integer | Yes | From the plans list. |
recipient | string | Yes, except exam | Phone number (data, airtime), meter number (electricity) or smartcard number (cable). |
amount | string | Airtime and electricity | Naira as a string, for example "500". |
meter_type | string | No | Electricity only. prepaid (default) or postpaid. |
quantity | integer | No | Exam only. How many PINs, 1 to 5. Default 1. |
customer_name | string | No | The name you got from validation (electricity, cable). Up to 160 characters. |
request_id | string | No | Same as the Idempotency-Key header. The header wins if you send both. |
curl -X POST https://jeweldatasub.com.ng/api/v1/orders \
-H "Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx" \
-H "Idempotency-Key: order-10001" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-d '{"product_id": 12, "recipient": "08031234567"}'
Answer (HTTP 201):
{
"ok": true,
"data": {
"reference": "JDS-261018-AB12CD34",
"request_id": "order-10001",
"service": "data",
"network": "mtn",
"item": "1GB",
"product_id": 12,
"recipient": "08031234567",
"quantity": 1,
"amount_kobo": 26000,
"amount": "260.00",
"status": "successful",
"final": true,
"message": "Delivered successfully.",
"token": null,
"units": null,
"pins": null,
"customer_name": null,
"created_at": "2026-10-18T10:05:12+01:00",
"completed_at": "2026-10-18T10:05:14+01:00"
}
}
amount / amount_kobo is what was taken from your wallet.final is true when the status will not change again.token and units (electricity) and pins (exam) appear only when the status is successful./orders/{reference}orders:readOne order. {reference} can be our reference (JDS-...) or your Idempotency-Key. So if a buy request timed out, you can look it up with your own ID. The answer has the same fields as POST /orders.
curl https://jeweldatasub.com.ng/api/v1/orders/order-10001 \ -H "Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx" -H "Accept: application/json"
Unknown reference: HTTP 404 with not_found.
/ordersorders:readYour orders, newest first.
| Query | Type | Required | Description |
|---|---|---|---|
status | string | No | Only this status, for example successful. See statuses. |
service | string | No | Only this service, for example data. |
per_page | integer | No | 1 to 100. Default 25. |
page | integer | No | Page number. Starts at 1. |
curl "https://jeweldatasub.com.ng/api/v1/orders?status=successful&service=data&per_page=50" \ -H "Authorization: Bearer jds_live_xxxxxxxxxxxxxxxx" -H "Accept: application/json"
{
"ok": true,
"data": {
"items": [ { "reference": "JDS-261018-AB12CD34", "status": "successful", ... } ],
"page": 1,
"pages": 4,
"total": 182
}
}
All of these go to POST https://jeweldatasub.com.ng/api/v1/orders with your key and a new Idempotency-Key. Only the body changes. Get each product_id from the plans list.
Pick the network, then the data type (category), then the plan.
{ "product_id": 12, "recipient": "08031234567" }
One plan for each network. Send the amount in naira.
{ "product_id": 40, "recipient": "08031234567", "amount": "500" }
One plan for each disco. First check the meter with POST /validate/meter, then buy. The token comes back in token (and units if the disco sends it).
{
"product_id": 51,
"recipient": "45012345678",
"amount": "5000",
"meter_type": "prepaid",
"customer_name": "ADEBAYO JOHNSON"
}
Check the smartcard with POST /validate/smartcard, then buy the package. No amount: the package has a fixed price.
{ "product_id": 77, "recipient": "7012345678", "customer_name": "TUNDE BELLO" }
One plan for each exam body (WAEC, NECO, NABTEB, JAMB). No recipient is needed. You pay the plan price times quantity. The PINs come back in pins.
{ "product_id": 90, "quantity": 2 }
For exam orders, recipient in the answer shows how many PINs, for example "2 PINs".
Networks in Nigeria can be slow. A request may time out even though we got it. The Idempotency-Key keeps you safe:
order-10001.| status | Final? | Meaning |
|---|---|---|
| created | No | We saved the order. It moves to processing almost at once. |
| processing | No | Your wallet was charged and we are sending the order to the network. |
| pending_provider | No | The network has not confirmed yet. Wait for the webhook or check again. |
| successful | Yes | Delivered. This is the only status that means the customer got it. |
| failed | No | It did not work. A refund starts straight away. |
| refund_pending | No | The refund is being written to your wallet. |
| refunded | Yes | Failed and your money is back in your wallet. Final. |
| manual_review | No | Still not confirmed after some time. Our staff will check it by hand. |
| cancelled | Yes | Stopped before your wallet was charged. Final. |
status is successful. If it is not final yet, wait for the webhook or check GET /orders/{reference} every minute or so.A webhook lets us tell your server when an API order is finished, so you do not need to keep checking.
https:// address.whsec_). It is shown once. Each time you save the URL again, a new secret is made and the old one stops working.When an order you placed with the API becomes successful or refunded, we send a POST with a JSON body. data has the same fields as an order.
| event | When |
|---|---|
order.successful | The order was delivered. |
order.refunded | The order failed and the money is back in your wallet. |
POST /your/webhook/url
Content-Type: application/json
X-JDS-Timestamp: 1792310714
X-JDS-Signature: 5f2b9c0e...(64 hex characters)
{"event":"order.successful","data":{"reference":"JDS-261018-AB12CD34","request_id":"order-10001","service":"electricity","network":"ikedc","item":"IKEDC Prepaid","product_id":51,"recipient":"45012345678","quantity":1,"amount_kobo":500000,"amount":"5000.00","status":"successful","final":true,"message":"Payment successful. Your token is ready.","token":"1234-5678-9012-3456-7890","units":"68.2","pins":null,"customer_name":"ADEBAYO JOHNSON","created_at":"2026-10-18T10:05:12+01:00","completed_at":"2026-10-18T10:05:20+01:00"}}
X-JDS-Signature is the HMAC-SHA256 (in hex) of the text {X-JDS-Timestamp}.{raw body}, using your signing secret as the key. Work it out yourself and compare. Use the raw body exactly as received, before you decode the JSON.
<?php
$secret = 'whsec_xxxxxxxxxxxxxxxx'; // your signing secret
$body = file_get_contents('php://input'); // raw body
$timestamp = $_SERVER['HTTP_X_JDS_TIMESTAMP'] ?? '';
$signature = $_SERVER['HTTP_X_JDS_SIGNATURE'] ?? '';
$expected = hash_hmac('sha256', $timestamp . '.' . $body, $secret);
if (! hash_equals($expected, $signature) || abs(time() - (int) $timestamp) > 300) {
http_response_code(401); // not from us, or too old
exit;
}
$event = json_decode($body, true);
$order = $event['data'];
// Find your order by $order['request_id'] (your Idempotency-Key)
// and update it. Then reply 200 quickly.
http_response_code(200);
reference or request_id to ignore repeats.Use these codes for network in the plans list. They also appear in every order.
| Service | service code | network code | Name |
|---|---|---|---|
| Data | data |
mtn |
MTN |
airtel |
Airtel | ||
glo |
Glo | ||
9mobile |
T2 Mobile | ||
| Airtime | airtime |
mtn |
MTN |
airtel |
Airtel | ||
glo |
Glo | ||
9mobile |
T2 Mobile | ||
| Electricity | electricity |
ikedc |
Ikeja Electric (IKEDC) |
ekedc |
Eko Electric (EKEDC) | ||
aedc |
Abuja Electric (AEDC) | ||
kedco |
Kano Electric (KEDCO) | ||
phed |
Port Harcourt Electric (PHED) | ||
jed |
Jos Electric (JED) | ||
ibedc |
Ibadan Electric (IBEDC) | ||
kaedco |
Kaduna Electric (KAEDCO) | ||
eedc |
Enugu Electric (EEDC) | ||
bedc |
Benin Electric (BEDC) | ||
yedc |
Yola Electric (YEDC) | ||
aba |
Aba Power | ||
| Cable TV | cable |
dstv |
DStv |
gotv |
GOtv | ||
startimes |
StarTimes | ||
| Exam pins | exam |
waec |
WAEC |
neco |
NECO | ||
nabteb |
NABTEB | ||
jamb |
JAMB |
This part is for the Jewel Data Sub mobile app, not for resellers. If you sell from your own site, use an API key as shown above.
POST /auth/login with login (email or phone), password, and code if two-factor login is on. It returns a token that lasts 30 days. Use it as the Bearer token."pin": "1234".If your website already buys from an MSORG site (Alrahuz, Masuddata) or from Legit Data Way, you can switch to Jewel Data Sub by changing two things: the base URL to https://jeweldatasub.com.ng/api, and the token to your Jewel Data Sub API key. The field names stay the same.
Authorization: Token jds_live_xxxxxxxxxxxxxxxx on every request (Bearer also works).POST /api/user with Authorization: Basic base64(your email:your API key). It returns your key as AccessToken and your balance. Never send your account password.balance:read, catalogue:read, orders:create, orders:read.| What | Alrahuz / Masuddata style | Legit Data Way style |
|---|---|---|
| Balance | GET /api/user/ → user.wallet_balance | POST /api/user → balance |
| Plan ids and prices | GET /api/network/ (data plans by network, cable plans, airtime, exam, discos) | |
| Data | POST /api/data/ network, mobile_number, plan, Ported_number | POST /api/data network, phone, data_plan, bypass, request-id |
| Airtime | POST /api/topup/ network, amount, mobile_number, Ported_number, airtime_type | POST /api/topup network, phone, plan_type, amount, bypass, request-id |
| Electricity | POST /api/billpayment/ disco_name, amount, meter_number, MeterType (1 prepaid, 2 postpaid) | POST /api/bill disco, meter_type (prepaid/postpaid), meter_number, amount, request-id |
| Cable TV | POST /api/cablesub/ cablename, cableplan, smart_card_number | POST /api/cable cable, cable_plan, iuc, request-id |
| Exam PINs | POST /api/epin/ exam_name (WAEC, NECO...), quantity | POST /api/exam exam, quantity, request-id |
| Check meter | GET /api/validatemeter?meternumber=&disconame=&mtype= | GET /api/bill/bill-validation?meter_number=&disco=&meter_type= |
| Check smartcard | GET /api/validateiuc?smart_card_number=&cablename= | GET /api/cable/cable-validation?iuc=&cable= |
| Check an order | GET /api/data/{id}, /api/topup/{id}, /api/billpayment/{id}... | GET /api/transaction?request-id=... |
Data and cable plan ids are our plan ids from GET /api/network/. Send a unique request-id (or ident) with each order: sending the same one again returns the first order instead of charging you twice.
| Alrahuz / Masuddata style | Legit style | |
|---|---|---|
| Networks | MTN 1, GLO 2, T2 MOBILE (9MOBILE) 3, AIRTEL 4 | MTN 1, AIRTEL 2, GLO 3, T2 MOBILE (9MOBILE) 4 |
| Cable | GOTV 1, DSTV 2, STARTIMES 3 | gotv, dstv, startimes |
| Discos | Ikeja 1, Eko 2, Abuja 3, Kano 4, Enugu 5, Port Harcourt 6, Ibadan 7, Kaduna 8, Jos 9, Benin 10, Yola 11 | Ikeja 1, Eko 2, Kano 3, Port Harcourt 4, Jos 5, Ibadan 6, Kaduna 7, Abuja 8, Yola 9, Benin 10, Enugu 11 |
| Exams | WAEC, NECO, NABTEB, JAMB | WAEC 1, NECO 2, NABTEB 3, JAMB 4 |
Names work too, for example "network": "MTN" or "disco": "ikeja".
curl -X POST https://jeweldatasub.com.ng/api/data/ \
-H "Authorization: Token jds_live_xxxxxxxxxxxxxxxx" -H "Content-Type: application/json" \
-d '{"network": 1, "mobile_number": "08031234567", "plan": 18, "Ported_number": true}'
{
"id": 1042, "ident": "JDS-261019-AB12CD34",
"Status": "successful", "status": "successful",
"network": 1, "mobile_number": "08031234567",
"plan": 18, "plan_name": "1GB", "plan_amount": "270.00",
"balance_before": "10000.00", "balance_after": "9730.00",
"api_response": "Delivered", "create_date": "2026-10-19T21:30:00+00:00"
}
Every answer has both the Alrahuz / Masuddata fields (Status: successful, failed, processing) and the Legit fields (status: success, fail, process in Legit style; request-id, oldbal, newbal). Errors come back with HTTP 400 and {"error": ["message"]} (Alrahuz / Masuddata style) or {"status": "fail", "message": "..."} (Legit style). Electricity answers include token, and exam answers include pins.
Need help? Contact us and tell us your key name (never the key itself).