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 the list of available data bundles and their prices.

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

Create Purchase

Purchase a data bundle for a specific phone number.

Request Body
{
  "bundleId": "bundle_12345",
  "recipientNumber": "0540000000",
    "clientReference": "YOUR_UNIQUE_ID_HERE"
}
Response Example
{
  "success": true,
  "order": {
    "id": "cm4x9...",
      "clientReference": "YOUR_UNIQUE_ID_HERE",
    "bundleSize": "1GB",
    "pricePaid": 5.0,
    "recipientNumber": "0540000000",
    "clientReference": "YOUR_UNIQUE_ID_HERE",
    "status": "PROCESSING",
    "createdAt": "2026-08-11T10:05:00.000Z"
  }
}
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...",
      "clientReference": "YOUR_UNIQUE_ID_HERE",
    "bundleSize": "1GB",
    "pricePaid": 5.0,
    "recipientNumber": "0540000000",
    "clientReference": "YOUR_UNIQUE_ID_HERE",
    "status": "DELIVERED",
    "createdAt": "2026-08-11T10:05:00.000Z"
  }
}

Webhooks

Instead of constantly polling the Check Order Status endpoint, configure a Webhook URL in your API settings. We will send an HTTP POST request to your URL whenever an order status is updated (e.g., from PENDING to DELIVERED or REJECTED).

Expected Payload
{
  "orderId": 12345,
  "apiReference": "API-XYZ123",
  "phone": "0540000000",
  "network": "MTN",
  "size": "1GB",
  "status": "DELIVERED",
  "price": 4.50,
  "date": "2026-10-02T12:00:00Z"
}

Your webhook endpoint must return a 200 OK response.

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",
      "clientReference": "YOUR_UNIQUE_ID_HERE"
  }'
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',
      clientReference: 'YOUR_UNIQUE_ID_HERE'
  })
})
.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',
      'clientReference' => 'YOUR_UNIQUE_ID_HERE'
]);

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',
      'clientReference' => 'YOUR_UNIQUE_ID_HERE'
);

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