O
Sureapi
Type to search the docs...

Airtime API

Integrate airtime top-ups for any Nigerian mobile network directly into your application.


Get Networks

Retrieve a list of supported networks and their corresponding IDs for airtime purchases.

GET https://sureapi.ng/api/get-networks?service=airtime

Query Parameters

Parameter Type Required Description
service String Required Must be exactly airtime.
curl -X GET "https://sureapi.ng/api/get-networks?service=airtime" \
      -H "Authorization: Token YOUR_API_KEY" \
      -H "Content-Type: application/json"
<?php
    $url = 'https://sureapi.ng/api/get-networks?service=airtime';
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Token YOUR_API_KEY',
            'Content-Type: application/json',
        ]
    ]);
    $response = curl_exec($ch);
    curl_close($ch);
    print_r(json_decode($response, true));
    ?>
const response = await fetch('https://sureapi.ng/api/get-networks?service=airtime', {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      }
    });
    const data = await response.json();
    console.log(data);
import requests

    url = "https://sureapi.ng/api/get-networks?service=airtime"
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    response = requests.get(url, headers=headers)
    print(response.json())

Response

✓ 200 OK
{
      "status": "success",
      "data": [
        { "id": 1, "name": "MTN", "code": "MTN" },
        { "id": 2, "name": "Airtel", "code": "AIRTEL" },
        { "id": 3, "name": "Glo", "code": "GLO" },
        { "id": 4, "name": "9mobile", "code": "9MOBILE" }
      ]
    }

Purchase Airtime

Send airtime to any mobile number. Supports standard VTU and specialized plan types.

POST https://sureapi.ng/api/airtime

Request Body

Parameter Type Required Description
network Integer Yes Network ID retrieved from /get-networks.
phone String Yes Recipient's phone number (e.g., 08012345678).
amount String|Integer Yes Amount in Naira. Minimum varies by network (usually ₦50).
type String Yes Type of top-up (e.g., VTU, ShareAndSell).
bypass Boolean Optional Skip phone number validation checks. Defaults to false.
request-id String Optional Idempotency key to prevent duplicate transactions. Max 36 chars.
curl -X POST "https://sureapi.ng/api/airtime" \
      -H "Authorization: Token YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "network": 1,
        "phone": "08012345678",
        "amount": "100",
        "request-id": "txn_12345"
      }'
<?php
    $url = 'https://sureapi.ng/api/airtime';
    $payload = [
        'network' => 1,
        'phone' => '08012345678',
        'amount' => '100',
        'request-id' => 'API_' . uniqid()
    ];
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => json_encode($payload),
        CURLOPT_HTTPHEADER => [
            'Authorization: Token YOUR_API_KEY',
            'Content-Type: application/json',
        ]
    ]);
    $response = curl_exec($ch);
    curl_close($ch);
    print_r(json_decode($response, true));
    ?>
const response = await fetch('https://sureapi.ng/api/airtime', {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        network: 1,
        phone: '08012345678',
        amount: '100',
        'request-id': 'txn_12345'
      })
    });
    const data = await response.json();
    console.log(data);
import requests

    url = "https://sureapi.ng/api/airtime"
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    payload = {
        "network": 1,
        "phone": "08012345678",
        "amount": "100",
        "request-id": "txn_12345"
    }
    response = requests.post(url, json=payload, headers=headers)
    print(response.json())

Responses

✓ 200 OK
{
      "status": "success",
      "Status": "successful",
      "message": "Airtime Purchase Successful.",
      "response": "MTN VTU Airtime #100 sent to 08012345678",
      "api_response": "MTN VTU Airtime #100 sent to 08012345678",
      "request-id": "API_66bbd45c67b7b",
      "service": "airtime",
      "amount": "100",
      "old_balance": 5000,
      "new_balance": 4900
    }
✕ 422 Validation Error
{
      "status": "fail",
      "Status": "failed",
      "message": "Insufficient wallet balance",
      "response": "Insufficient wallet balance",
      "api_response": "Insufficient wallet balance",
    }