Your API Token

Use this token to authenticate your API requests. Keep it secret!

Log in to Generate Token

Please log in to manage your API tokens.

Authentication

All API requests require your API token to be sent in the Authorization header as a Bearer token.

Authorization: Bearer <YOUR_API_TOKEN>

API Endpoints

Available API endpoints for your integration.

Authentication

Authenticate your API requests by including your secret API key in the Authorization header as a Bearer token.

Authorization: Bearer YOUR_API_KEY
GEThttps://elitedatagh.com/api/v1/balance

Check Balance

Retrieve your current account wallet balance and status.

Response Example
{
  "success": true,
  "data": {
    "username": "kofi_dev",
    "balance": 150.50,
    "currency": "GHS",
    "status": "ACTIVE"
  }
}
GEThttps://elitedatagh.com/api/v1/bundles

Fetch Bundles

Retrieve all available data bundles. Automatically applies any custom reseller pricing associated with your account.

Response Example
{
  "success": true,
  "bundles": [
    {
      "bundleId": "clx...",
      "network": "MTN",
      "size": "1GB",
      "label": "1GB",
      "size_mb": 1000,
      "price": 5.00
    }
  ]
}
POSThttps://elitedatagh.com/api/v1/purchase

Create Purchase

Creates a new data bundle order and deducts funds from your available wallet balance.

Request Body (JSON)
ParameterTypeDescription
bundleIdstringThe unique ID of the bundle (e.g., clx...). Aliases: bundle
recipientNumberstringThe target phone number. Aliases: phone, phone_number
referencestring (opt)A unique string to prevent duplicate orders.
Response Example
{
  "success": true,
  "message": "Order created successfully",
  "order": {
    "id": "104928",
    "recipientNumber": "0595753044",
    "bundleSize": "1GB",
    "price": 5.00,
    "status": "PROCESSING",
    "createdAt": "2026-03-20T10:00:00Z"
  }
}
GEThttps://elitedatagh.com/api/v1/verify-number?number=0595753044

Verify Number

Check if a phone number is eligible or verified for a data bundle.

Response Example
{
  "success": true,
  "status": "Verified",
  "message": "Number is verified"
}
GEThttps://elitedatagh.com/api/v1/orders?id=ORDER_ID

Check Order Status

Retrieve the status of a specific order or fetch your 10 most recent orders if no ID is provided.

Response Example
{
  "success": true,
  "order": {
    "id": "cm4x9...",
    "bundleSize": "1GB",
    "pricePaid": 5.0,
    "recipientNumber": "0540000000",
    "status": "DELIVERED",
    "createdAt": "2026-08-11T10:05:00.000Z"
  }
}

Purchase Code Examples

cURL
curl -X POST https://elitedatagh.com/api/v1/purchase \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "bundleId": "bundle_12345",
    "recipientNumber": "0595753044"
  }'
JavaScript (Fetch)
fetch('https://elitedatagh.com/api/v1/purchase', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    bundleId: 'bundle_12345',
    recipientNumber: '0595753044'
  })
})
.then(res => res.json())
.then(console.log);
PHP (cURL)
<?php
$ch = curl_init('https://elitedatagh.com/api/v1/purchase');
$payload = json_encode([
    'bundleId' => 'bundle_12345',
    'recipientNumber' => '0595753044'
]);

curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_TOKEN',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 

$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
WordPress (wp_remote_post)
<?php
$url = 'https://elitedatagh.com/api/v1/purchase';
$body = array(
    'bundleId' => 'bundle_12345',
    'recipientNumber' => '0595753044'
);

$args = array(
    'body'        => json_encode($body),
    'headers'     => array(
        'Authorization' => 'Bearer YOUR_API_TOKEN',
        'Content-Type'  => 'application/json'
    ),
    'timeout'     => 45,
    'sslverify'   => false
);

$response = wp_remote_post($url, $args);

if (is_wp_error($response)) {
    echo "Something went wrong: " . $response->get_error_message();
} else {
    echo wp_remote_retrieve_body($response);
}
?>

Error Codes

  • 400 Bad Request - Missing required parameters (bundleId or recipientNumber), or invalid JSON format.
  • 401 Unauthorized - Missing, invalid, or incorrectly formatted API key.
  • 402 Payment Required - Insufficient funds in your wallet balance.
  • 403 Forbidden - Your account is suspended.
  • 404 Not Found - The provided bundleId does not exist.