Connecting...
Back to Dashboard

Developer API

Connect your external applications to SureData using our secure REST API.

API Key

SECRET KEY
Loading...

Webhooks

WEBHOOK URL

We will send POST requests here when order statuses change (e.g. pending to completed).

EVENTS SENT
order.completedorder.failed

API Documentation

Authentication

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

HTTP Header
Authorization: Bearer YOUR_API_KEY
GET/api/v1/balance

Fetch your current wallet balance.

cURL Example
curl -X GET "https://suredata.store/api/v1/balance" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response Payload200 OK
{
  "status": "success",
  "data": {
    "balance": 250.50,
    "currency": "GHS"
  }
}
GET/api/v1/bundles

Get all active data bundles and their prices.

cURL Example
curl -X GET "https://suredata.store/api/v1/bundles" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response Payload200 OK
{
  "status": "success",
  "data": [
    {
      "id": "mtn-1",
      "network": "mtn",
      "data_volume": "1 GB",
      "price": 4.40
    },
    {
      "id": "mtn-4",
      "network": "mtn",
      "data_volume": "4 GB",
      "price": 17.30
    },
    {
      "id": "mtn-8",
      "network": "mtn",
      "data_volume": "10 GB",
      "price": 42.00
    },
    {
      "id": "tel-1",
      "network": "telecel",
      "data_volume": "10 GB",
      "price": 43.50
    },
    {
      "id": "at-1",
      "network": "airteltigo",
      "data_volume": "20 GB",
      "price": 65.50
    }
  ]
}
POST/api/v1/order

Submit a data purchase. Cost is deducted from your SureData wallet.

REQUEST BODY PARAMETERS
networkstringrequired
"mtn", "telecel", or "airteltigo"
bundle_idstringrequired
Bundle ID from /api/v1/bundles (e.g. "mtn-1")
phonestringrequired
Beneficiary phone number
referencestringoptional
Your own unique transaction ID (optional)
cURL Example
curl -X POST "https://suredata.store/api/v1/order" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "network": "mtn",
    "bundle_id": "mtn-4",
    "phone": "0241234567",
    "reference": "MY-ORDER-001"
  }'
Response Payload200 OK
{
  "status": "success",
  "message": "Order placed. Now processing.",
  "data": {
    "reference": "MY-ORDER-001",
    "network": "mtn",
    "data_volume": "4 GB",
    "amount_charged": 17.30,
    "status": "processing"
  }
}