🚀 API Documentation

Integrate data bundle purchases into your app seamlessly.

Wallet balance must be sufficient before order creation.

🔑 Get API Key:

My account


🔐 Authentication

Include your API key in request headers:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

🌐 Endpoint

POST
https://idatagh.com/wp-json/custom/v1/place-order

Creates a new data bundle order.

📡 Networks

mtn
telecel
airteltigo

📦 Request Body

{
  "network": "mtn",
  "beneficiary": "0547264035",
  "pa_data-bundle-packages": 2
}

✅ Success Response (200)

{
  "status": "success",
  "order_id": 1669242,
  "amount": 8.3,
  "network": "MTN",
  "beneficiary": "0547264035"
}

💰 Check Wallet Balance

Retrieve your current wallet balance.

GET
https://idatagh.com/wp-json/custom/v1/wallet-balance

Success Response (200 OK)

{
  "status": "success",
  "balance": 3471.44
}

📦 Check Order Status

Check the status of a specific order using order_id.

GET
https://idatagh.com/wp-json/custom/v1/order-status?order_id=1866162

Success Response (200 OK)

{
  "status": "success",
  "order_id": 1866162,
  "order_status": "Completed",
  "amount": 4.15
}

📦 Fetch Data packages

Fetch data packages of a specific Newkork (MTN, Telecel & Airteltigo.

GET
https://idatagh.com/wp-json/custom/v1/packages?network=mtn

Success Response (200 OK)

{
  {
    "status": "success",
    "network": "MTN",
    "packages": [
        {
            "package_id": 10497,
            "label": "1",
            "price": 4.15,
            "data_size": 1
        },
        {
            "package_id": 10501,
            "label": "2",
            "price": 8.3,
            "data_size": 2
        },
        {
            "package_id": 10531,
            "label": "3",
            "price": 12.45,
            "data_size": 3
        },
        {
            "package_id": 10503,
            "label": "4",
            "price": 16.6,
            "data_size": 4
        },
        {
            "package_id": 10505,
            "label": "5",
            "price": 20.75,
            "data_size": 5
        },
}