Official API & Reseller Integration Guide

Connect to MELE DATA API

Vend automated MTN, Airtel, Glo, and 9mobile data bundles and airtime directly from your WordPress VTU plugin, custom script, or portal. Simple setup, instant automated delivery, and low wholesale prices.

BASE URL:https://api.meledata.ng/api/v1/developer
Copy My API Key
Quick Start

Integrate MELE DATA API in 5 Steps

Open Developer Portal
1

Activate Developer Access

Sign in and open Developer API to request or activate API access.

2

Generate Live & Sandbox Keys

Click Generate API Keys and save your Live Secret Key and Sandbox Test Key immediately.

3

Test Free in Sandbox

Use your Test Secret Key with a virtual ₦1,000,000 balance — no live funding needed.

4

Configure Webhook & Plan IDs

Set your HTTPS Webhook URL on /developer and sync plan IDs from GET /data/plans.

5

Fund Wallet & Go Live

Fund your MELE DATA wallet via your virtual account, switch your Authorization header to your Live Secret Key, and start vending.

Base URLs & Environments

Both Live and Sandbox use the same Base URL — the environment is selected automatically by whether you pass your Live Key or Sandbox Test Key.

Production (Live Vending)
https://api.meledata.ng/api/v1/developer
Auth: Live Secret Key (Debits real wallet)
Sandbox (Free Testing)
https://api.meledata.ng/api/v1/developer
Auth: Test Secret Key (₦1,000,000 virtual wallet)
Reseller Mapping Catalog

Live Plan IDs & Pricing

Click the Copy ID button on any plan to paste the ID directly into your VTU portal or plugin.

NetworkTypePlan Name & SizePLAN ID (For Your Script)ValidityReseller Price
MTNMTNSME500MB SME Data
401
30 Days₦130.00
MTNMTNSME1.0 GB SME Data
402
30 Days₦259.00
MTNMTNSME2.0 GB SME Data
403
30 Days₦518.00
MTNMTNSME3.0 GB SME Data
404
30 Days₦777.00
MTNMTNSME5.0 GB SME Data
405
30 Days₦1,295.00
MTNMTNSME10.0 GB SME Data
406
30 Days₦2,590.00
MTNMTNCorporate Gifting1.0 GB Corporate Gifting
411
30 Days₦265.00
MTNMTNCorporate Gifting2.0 GB Corporate Gifting
412
30 Days₦530.00
MTNMTNCorporate Gifting5.0 GB Corporate Gifting
413
30 Days₦1,325.00
AIRTELAIRTELCorporate Gifting500MB Corporate Gifting
421
30 Days₦135.00
AIRTELAIRTELCorporate Gifting1.0 GB Corporate Gifting
422
30 Days₦265.00
AIRTELAIRTELCorporate Gifting2.0 GB Corporate Gifting
423
30 Days₦530.00
AIRTELAIRTELCorporate Gifting5.0 GB Corporate Gifting
424
30 Days₦1,325.00
AIRTELAIRTELCorporate Gifting10.0 GB Corporate Gifting
425
30 Days₦2,650.00
GLOGLOCorporate Gifting500MB Corporate Gifting
431
30 Days₦135.00
GLOGLOCorporate Gifting1.0 GB Corporate Gifting
432
30 Days₦260.00
GLOGLOCorporate Gifting2.0 GB Corporate Gifting
433
30 Days₦520.00
GLOGLOCorporate Gifting5.0 GB Corporate Gifting
434
30 Days₦1,300.00
9MOBILE9MOBILECorporate Gifting500MB Corporate Gifting
441
30 Days₦120.00
9MOBILE9MOBILECorporate Gifting1.0 GB Corporate Gifting
442
30 Days₦210.00
9MOBILE9MOBILECorporate Gifting2.0 GB Corporate Gifting
443
30 Days₦420.00
9MOBILE9MOBILECorporate Gifting5.0 GB Corporate Gifting
444
30 Days₦1,050.00

Authentication

Every request to the MELE DATA developer endpoints requires your API Key. Pass it in your HTTP headers using either the standard Authorization header or the X-API-Key header:

Standard Header Formats
Authorization: Token YOUR_API_KEY
Authorization: Bearer YOUR_API_KEY
X-API-Key: YOUR_API_KEY
GET

Check Wallet Balance

Check your available wallet balance to ensure you have sufficient funds before dispatching orders.

GEThttps://api.meledata.ng/api/v1/developer/user(or /developer/wallet)
Sample 200 Success Response
{
  "status": "success",
  "user": {
    "username": "reseller@example.com",
    "wallet_balance": 45200.00
  },
  "data": {
    "balance": 45200.00,
    "currency": "NGN"
  }
}
GET

Fetch Live Data Plans & Your API Prices

Programmatically pull all active data bundles, plan IDs, and your exact reseller rates so your platform stays automatically synced.

GEThttps://api.meledata.ng/api/v1/developer/data/plans
Sample 200 Success Response
{
  "status": true,
  "message": "Data plans retrieved successfully",
  "data": {
    "plans": [
      {
        "plan_id": 402,
        "plan_code": "1001",
        "network": "MTN",
        "plan_name": "1.0 GB SME Data",
        "data_size": "1GB",
        "validity": "30 Days",
        "price": 259.0
      }
    ]
  }
}
POST

Purchase Data Bundle

Vends a specific data plan to the recipient's phone number. Delivery takes between 2 to 10 seconds.

POSThttps://api.meledata.ng/api/v1/developer/data(or /developer/data/purchase)
Request Body (JSON)
FieldTypeRequiredDescription & Aliases
phoneStringYESRecipient 11-digit phone number (e.g. 08012345678). Aliases: phone_number, mobile_number.
planIntegerYESThe numerical Plan ID from the catalog table above (e.g. 402). Alias: plan_id.
networkString / IntYESNetwork identifier: 1 or "MTN", 2 or "GLO", 3 or "9MOBILE", 4 or "AIRTEL".
bypassBooleanOptionalSet to true if number is ported across carriers. Alias: Ported_number.
request-idStringOptionalUnique reference string from your portal for idempotency. Alias: reference.
curl -X POST "https://api.meledata.ng/api/v1/developer/data" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "network": "MTN",
    "phone": "08012345678",
    "plan": 402,
    "request-id": "ORD_17849201"
  }'
Sample 200 Success Response
{
  "status": true,
  "message": "Transaction successful",
  "data": {
    "status": "success",
    "reference": "ORD_17849201",
    "amount": 259.0,
    "network": "MTN",
    "phone_number": "08012345678"
  }
}
POST

Purchase Airtime Topup

Instant airtime recharge for MTN, Airtel, Glo, and 9mobile with wholesale discount.

POSThttps://api.meledata.ng/api/v1/developer/topup(or /developer/airtime/purchase)
Sample Request Payload
{
  "network": "MTN",
  "phone": "08012345678",
  "amount": 500,
  "reference": "AIR_992182"
}
GET

Query Data & Airtime Transaction Status

Check the real-time status of any Data or Airtime transaction using the reference / request-id you submitted at purchase time.

GEThttps://api.meledata.ng/api/v1/developer/airtime/status?ref=YOUR_REFERENCE
Aliases: /developer/data/status?ref=... or /developer/transaction/status?ref=...
Sample 200 Success Response
{
  "status": true,
  "message": "Transaction found",
  "data": {
    "reference": "ORD_17849201",
    "status": "delivered",
    "network": "mtn",
    "mobile_number": "08012345678",
    "plan": "1001",
    "amount_charged": 259.0,
    "message": "Data plan delivered to 08012345678 successfully.",
    "livemode": true,
    "mode": "live"
  }
}
WEBHOOK

Webhooks & Callback Verification

Whenever a pending Data or Airtime transaction finishes (delivered or failed), MELE DATA dispatches an HTTP POST JSON callback to your configured Webhook URL.

POSThttps://api.meledata.ng/api/v1/developer/webhook/config(or configure inside /developer)
Body: {"webhook_url": "https://your-domain.com/webhooks/vtu"} — returns your webhook_secret (whsec_...).
Incoming Webhook Payload
{
  "event": "transaction.updated",
  "data": {
    "reference": "YOUR_CLIENT_REFERENCE",
    "status": "delivered",
    "amount": 259.0,
    "network": "MTN",
    "mobile_number": "08012345678",
    "timestamp": "2026-11-30T21:10:00Z"
  }
}
Authenticity Verification (HMAC-SHA512)

Every callback includes the X-Mele-Signature HTTP header. Compute an HMAC-SHA512 hex digest of the raw JSON body using your webhook_secret (whsec_...) and compare safely.

Header: X-Mele-Signature
Algorithm: HMAC-SHA512 (hex)
const crypto = require('crypto');

app.post('/webhooks/vtu', (req, res) => {
  const secret = process.env.WEBHOOK_SECRET; // whsec_...
  const sig = req.headers['x-mele-signature'];
  const expected = crypto
    .createHmac('sha512', secret)
    .update(JSON.stringify(req.body))
    .digest('hex');
  if (sig !== expected) return res.status(401).send('Invalid signature');

  const { reference, status } = req.body.data;
  // Update order status in your database
  res.status(200).json({ status: 'ok' });
});

Sandbox Testing Mode (No Funding Needed)

Test your entire integration (balance check, data, airtime, and status queries) without depositing real funds:

1. Use Test Secret Key

Use your Test Secret Key (shown under Sandbox Keys on /developer) instead of your Live Secret Key.

2. Simulate Success

Starts with ₦1,000,000 virtual balance. Any standard phone number (e.g. 08012345678) returns delivered.

3. Simulate Failure

Send a phone number ending in 0000 (e.g. 08012340000) to simulate a carrier timeout / failed response.

HTTP Status & Error Codes

Status CodeMeaningHow to Resolve
200 OKTransaction Successful or ProcessingOrder placed and dispatched to telecom network.
400 Bad RequestInsufficient Wallet Balance or Invalid PhoneFund your MELE DATA wallet or verify phone number is 11 digits.
401 UnauthorizedInvalid or Missing API KeyVerify your Authorization: Token ... header.
404 Not FoundPlan ID Not FoundCheck the Plan IDs table above and ensure the plan ID is correct for the network.
429 Rate LimitedToo Many RequestsMaximum 30 requests per minute per IP/account.

Reseller Frequently Asked Questions

Do I get debited if an order fails?

No. If a telecom network rejects an order or times out, the system automatically marks the transaction as failed and refunds your wallet balance immediately with 0 deduction.

Where do I find my API Key?

Log into your MELE DATA account, open the Developer / API page, and click "Generate API Key". Your live and test secret keys will be displayed once.

Can I test without spending real money?

Yes! Use your Test Secret Key from the Sandbox section of your Developer Portal. Test mode provides a simulated ₦1,000,000 sandbox wallet without charging real funds.

Which WordPress / VTU plugins are compatible?

Any WordPress VTU plugin or script that supports standard token headers and custom plan ID mapping (such as Monster VTU, Smart Recharge, VTU Auto, or Telecomabode-compatible integrations) works out of the box.

Need help connecting your website?

Our integration team is available to assist you with API keys, plan IDs, and plugin setup.