Jewel Data Sub
Version 1

Jewel Data Sub Developer API

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.

1. Getting started

  1. Create an account and fund your wallet.
  2. Ask for the API User level. Go to Profile, choose API User under "Upgrade your level" and send the request. We review it. Also add your website on the Profile page. You cannot create a key without it.
  3. Create a key. Open Developer API in your dashboard. Give the key a name, tick only the permissions (scopes) you need, add your server IP addresses, and confirm with your transaction PIN.
  4. Copy the key straight away. It looks like 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.

Scopes (permissions)

ScopeWhat it allows
balance:readSee wallet balance
catalogue:readSee plans and prices
orders:readSee orders
orders:createPlace orders (spends wallet money)

A request that needs a scope your key does not have gets 403 missing_scope.

IP allowlist

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.

Keep your key secret. Use it only on your server, never in a browser, mobile app or public code. Anyone with a key that has orders:create can spend your wallet. You can have up to 5 active keys. Revoking a key stops it at once.

2. Authentication

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.

3. Response format and errors

Success

{
  "ok": true,
  "data": { ... }
}

Error

{
  "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).

Form field errors (HTTP 422)

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."]
  }
}

HTTP status codes

CodeMeaning
200OK. Also returned when you repeat an order with the same Idempotency-Key.
201A new order was created.
401Missing, wrong or revoked key.
403IP not allowed, scope missing or account suspended.
404Not found (unknown order or service).
422The request is not valid, or a business rule stopped it (for example, low balance).
429Too many requests. Slow down and try again after the Retry-After seconds.
503The API, the service or the plan is switched off for now. Try again later.

Error codes

error.codeHTTPWhat to do
invalid_api_key401Check the key. It may be wrong or revoked.
unauthenticated401No key was sent, or it does not start with jds_live_.
ip_not_allowed403Add your server IP to the key, or call from an allowed IP.
missing_scope403Create a key with the needed scope.
account_suspended403Contact support.
not_found404No order with that reference on your account.
unknown_service404Use one of the service codes in the codes table.
missing_idempotency_key422Send an Idempotency-Key header. See Idempotency-Key.
invalid_amount422Send a naira string like "500" inside the plan's min and max.
invalid_recipient422Phone, meter or smartcard number is not valid.
invalid_product422Validation: the product_id is not an electricity (meter) or cable (smartcard) plan.
insufficient_balance422Fund your wallet.
limit_exceeded422The order is above the maximum for one order.
daily_limit422You reached your daily spending limit. Contact support to raise it.
service_off503The service or plan is switched off. Try again later or pick another plan.
service_unavailable503The plan does not exist or has no working provider now.
api_disabled503The whole API is switched off for now.

4. Amounts

  • In requests, send naira as a string: "amount": "500" or "1500.50". A JSON number like 500 is refused.
  • In responses, money comes two ways: kobo as a whole number ("amount_kobo": 50000) and naira as a string with two decimals ("amount": "500.00"). 100 kobo = ₦1.
  • Fields that end in _kobo are always kobo. Use kobo for sums to avoid rounding errors.

5. Rate limits

WhatLimit
All API requests120 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.

6. Endpoints

GET/meNo scope needed

Your 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
  }
}
GET/balancebalance:read

Your 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" }
  }
}
GET/virtual-accountsNo scope needed

Your bank account numbers for funding your wallet by bank transfer.

{
  "ok": true,
  "data": [
    { "bank": "9PSB", "account_number": "5030000000", "account_name": "JDS - Ada Okafor" }
  ]
}
GET/fundingsbalance:read

Your wallet funding history, newest first, 25 per page.

QueryTypeRequiredDescription
pageintegerNoPage 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
  }
}
GET/servicesNo scope needed

All 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
    },
    ...
  ]
}
GET/services/{service}/planscatalogue:read

Plans 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.

NameTypeRequiredDescription
service (path)stringYesdata, airtime, electricity, cable or exam.
network (query)stringNoOnly this network or biller, for example mtn or ikedc.
category (query)stringNoData 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.

POST/validate/{type}catalogue:read

Check a meter number or a smartcard (IUC) number and get the customer's name before you buy. {type} is meter or smartcard.

FieldTypeRequiredDescription
product_idintegerYesAn electricity plan (for meter) or a cable plan (for smartcard).
numberstringYesMeter number (6 to 13 digits) or smartcard number (8 to 12 digits).
meter_typestringNoprepaid (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
  }
}
Look at 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.
POST/ordersorders:create

Buy something. Your wallet is charged at once. If the order fails, the money goes back to your wallet automatically.

NameTypeRequiredDescription
Idempotency-Key (header)stringYesYour own unique ID for this order. 8 to 80 characters: letters, numbers, - _ : . You can send it as request_id in the body instead.
product_idintegerYesFrom the plans list.
recipientstringYes, except examPhone number (data, airtime), meter number (electricity) or smartcard number (cable).
amountstringAirtime and electricityNaira as a string, for example "500".
meter_typestringNoElectricity only. prepaid (default) or postpaid.
quantityintegerNoExam only. How many PINs, 1 to 5. Default 1.
customer_namestringNoThe name you got from validation (electricity, cable). Up to 160 characters.
request_idstringNoSame 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.
GET/orders/{reference}orders:read

One 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.

GET/ordersorders:read

Your orders, newest first.

QueryTypeRequiredDescription
statusstringNoOnly this status, for example successful. See statuses.
servicestringNoOnly this service, for example data.
per_pageintegerNo1 to 100. Default 25.
pageintegerNoPage 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
  }
}

7. Buying each service

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.

Data

Pick the network, then the data type (category), then the plan.

{ "product_id": 12, "recipient": "08031234567" }

Airtime

One plan for each network. Send the amount in naira.

{ "product_id": 40, "recipient": "08031234567", "amount": "500" }

Electricity

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"
}

Cable TV

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" }

Exam PINs

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".

8. Idempotency-Key (no double charge)

Networks in Nigeria can be slow. A request may time out even though we got it. The Idempotency-Key keeps you safe:

  • Make a new, unique key for every new order, for example your own order ID: order-10001.
  • If you are not sure the order went through, send the request again with the same key. You get the first order back (HTTP 200 instead of 201). You are never charged twice.
  • A repeat returns the first order even if the body is different. So never reuse a key for a different purchase.
  • You can also call GET /orders/{your key} to see what happened.

9. Order statuses

statusFinal?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.
Treat an order as delivered only when status is successful. If it is not final yet, wait for the webhook or check GET /orders/{reference} every minute or so.

10. Webhooks

A webhook lets us tell your server when an API order is finished, so you do not need to keep checking.

Set it up

  1. On the Developer API page, type your webhook URL next to the key and save. It must be a public https:// address.
  2. Copy the signing secret (starts with whsec_). It is shown once. Each time you save the URL again, a new secret is made and the old one stops working.

What we send

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.

eventWhen
order.successfulThe order was delivered.
order.refundedThe 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"}}

Check the signature

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);

Retries

  • Reply with any 2xx status within 10 seconds. Anything else counts as a failure.
  • We try up to 6 times in total, waiting about 30 seconds, 2 minutes, 10 minutes, 30 minutes and 1 hour between tries.
  • You may get the same event more than once. Use reference or request_id to ignore repeats.
  • If you have more than one key, webhooks go to the newest active key that has a webhook URL, signed with that key's secret.

11. Network and biller codes

Use these codes for network in the plans list. They also appear in every order.

Serviceservice codenetwork codeName
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

12. Mobile app login (our own app)

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.
  • App tokens can use every endpoint above without scopes, but buying needs the customer's 4-digit transaction PIN in the body: "pin": "1234".

13. Works like Alrahuz, Masuddata and Legit Data Way

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.

Login

  • Send Authorization: Token jds_live_xxxxxxxxxxxxxxxx on every request (Bearer also works).
  • Legit style login: 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.
  • Your key needs the right permissions: balance:read, catalogue:read, orders:create, orders:read.

Endpoints

WhatAlrahuz / Masuddata styleLegit Data Way style
BalanceGET /api/user/ → user.wallet_balancePOST /api/user → balance
Plan ids and pricesGET /api/network/ (data plans by network, cable plans, airtime, exam, discos)
DataPOST /api/data/ network, mobile_number, plan, Ported_numberPOST /api/data network, phone, data_plan, bypass, request-id
AirtimePOST /api/topup/ network, amount, mobile_number, Ported_number, airtime_typePOST /api/topup network, phone, plan_type, amount, bypass, request-id
ElectricityPOST /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 TVPOST /api/cablesub/ cablename, cableplan, smart_card_numberPOST /api/cable cable, cable_plan, iuc, request-id
Exam PINsPOST /api/epin/ exam_name (WAEC, NECO...), quantityPOST /api/exam exam, quantity, request-id
Check meterGET /api/validatemeter?meternumber=&disconame=&mtype=GET /api/bill/bill-validation?meter_number=&disco=&meter_type=
Check smartcardGET /api/validateiuc?smart_card_number=&cablename=GET /api/cable/cable-validation?iuc=&cable=
Check an orderGET /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.

Ids

Alrahuz / Masuddata styleLegit style
NetworksMTN 1, GLO 2, T2 MOBILE (9MOBILE) 3, AIRTEL 4MTN 1, AIRTEL 2, GLO 3, T2 MOBILE (9MOBILE) 4
CableGOTV 1, DSTV 2, STARTIMES 3gotv, dstv, startimes
DiscosIkeja 1, Eko 2, Abuja 3, Kano 4, Enugu 5, Port Harcourt 6, Ibadan 7, Kaduna 8, Jos 9, Benin 10, Yola 11Ikeja 1, Eko 2, Kano 3, Port Harcourt 4, Jos 5, Ibadan 6, Kaduna 7, Abuja 8, Yola 9, Benin 10, Enugu 11
ExamsWAEC, NECO, NABTEB, JAMBWAEC 1, NECO 2, NABTEB 3, JAMB 4

Names work too, for example "network": "MTN" or "disco": "ikeja".

Example

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).