GemData

GemData Reseller API

Authenticate every request with X-API-KEY and X-API-SECRET. Use headers as the primary integration path. All endpoints return JSON with status, message, and data.

Production recommendation: keep credentials in headers only, rotate secrets regularly, and treat POST-body credential fallback as a local-compatibility path rather than a preferred integration mode.

Endpoints

Method Endpoint Purpose
POST/gemdata/api/buy-airtime.phpPurchase airtime
POST/gemdata/api/buy-data.phpPurchase data
POST/gemdata/api/pay-electricity.phpBuy electricity tokens
POST/gemdata/api/cable-tv.phpRenew cable TV
POST/gemdata/api/exam-pin.phpBuy exam pins
POST/gemdata/api/recharge-card.phpGenerate recharge cards
POST/gemdata/api/data-card.phpGenerate data cards
POST/gemdata/api/bulk-sms.phpSend bulk SMS
GET/gemdata/api/balance.phpGet wallet balance
GET/gemdata/api/transactions.phpList transactions

Sample cURL

curl -X POST "http://localhost/gemdata/api/buy-airtime.php" \
  -H "X-API-KEY: gmd_live_your_key" \
  -H "X-API-SECRET: your_one_time_secret" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "08030000000",
    "amount": 1000
  }'

Sample JS Fetch

fetch('http://localhost/gemdata/api/buy-data.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-KEY': 'gmd_live_your_key',
    'X-API-SECRET': 'your_one_time_secret'
  },
  body: JSON.stringify({
    phone: '08030000000',
    plan: '2GB',
    amount: 1500
  })
}).then((res) => res.json()).then(console.log);

Authentication Notes

  • Send X-API-KEY and X-API-SECRET on every request.
  • Expect failed requests to return a descriptive message and a non-success status.
  • Keep request references on your side for reconciliation and retries.

Status Handling

  • success: request completed and provider response is available.
  • error: validation, auth, or wallet checks failed before completion.
  • Store the returned reference and transaction status for later reconciliation.

Response Shape

{
  "status": "success",
  "message": "Transaction successful",
  "data": {
    "reference": "GDT12345",
    "status": "successful"
  }
}