curl --request POST \
--url https://api.useglyde.co/v1/bills/airtime \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "bill_abc123",
"service_code": "mtn-airtime",
"phone_number": "08031234567",
"amount": 1000
}
'import requests
url = "https://api.useglyde.co/v1/bills/airtime"
payload = {
"reference": "bill_abc123",
"service_code": "mtn-airtime",
"phone_number": "08031234567",
"amount": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference: 'bill_abc123',
service_code: 'mtn-airtime',
phone_number: '08031234567',
amount: 1000
})
};
fetch('https://api.useglyde.co/v1/bills/airtime', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useglyde.co/v1/bills/airtime",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reference' => 'bill_abc123',
'service_code' => 'mtn-airtime',
'phone_number' => '08031234567',
'amount' => 1000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useglyde.co/v1/bills/airtime"
payload := strings.NewReader("{\n \"reference\": \"bill_abc123\",\n \"service_code\": \"mtn-airtime\",\n \"phone_number\": \"08031234567\",\n \"amount\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useglyde.co/v1/bills/airtime")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"bill_abc123\",\n \"service_code\": \"mtn-airtime\",\n \"phone_number\": \"08031234567\",\n \"amount\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useglyde.co/v1/bills/airtime")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference\": \"bill_abc123\",\n \"service_code\": \"mtn-airtime\",\n \"phone_number\": \"08031234567\",\n \"amount\": 1000\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Bill payment successful",
"data": {
"reference": "550e8400-e29b-41d4-a716-446655440000",
"merchant_reference": "bill_abc125",
"type": "debit",
"amount": "5000",
"status": "successful",
"fee": "0",
"bill": {
"category": "electricity",
"service_code": "ikeja-electric-prepaid",
"customer_identifier": "04123456789",
"customer_name": "John Doe",
"product_code": null,
"product_name": null,
"token": "1234-5678-9012-3456-7890",
"units": "42.5 kWh"
},
"created_at": "2026-10-21T10:30:00.000000Z"
}
}{
"status": "failed",
"message": "Insufficient funds, can not process this bill payment.",
"errors": {}
}{
"status": "failed",
"message": "Bill payments are temporarily unavailable. Please try again shortly.",
"errors": {}
}Buy Airtime
Buy airtime for a Nigerian mobile number. Your naira wallet is debited for the amount plus the bill payment fee.
The response carries the outcome: successful, failed (already refunded to your
wallet), or pending, which settles later and is announced by a bill.successful or
bill.failed webhook.
In production this endpoint is subject to IP whitelisting.
curl --request POST \
--url https://api.useglyde.co/v1/bills/airtime \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "bill_abc123",
"service_code": "mtn-airtime",
"phone_number": "08031234567",
"amount": 1000
}
'import requests
url = "https://api.useglyde.co/v1/bills/airtime"
payload = {
"reference": "bill_abc123",
"service_code": "mtn-airtime",
"phone_number": "08031234567",
"amount": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference: 'bill_abc123',
service_code: 'mtn-airtime',
phone_number: '08031234567',
amount: 1000
})
};
fetch('https://api.useglyde.co/v1/bills/airtime', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useglyde.co/v1/bills/airtime",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reference' => 'bill_abc123',
'service_code' => 'mtn-airtime',
'phone_number' => '08031234567',
'amount' => 1000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useglyde.co/v1/bills/airtime"
payload := strings.NewReader("{\n \"reference\": \"bill_abc123\",\n \"service_code\": \"mtn-airtime\",\n \"phone_number\": \"08031234567\",\n \"amount\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useglyde.co/v1/bills/airtime")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"bill_abc123\",\n \"service_code\": \"mtn-airtime\",\n \"phone_number\": \"08031234567\",\n \"amount\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useglyde.co/v1/bills/airtime")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference\": \"bill_abc123\",\n \"service_code\": \"mtn-airtime\",\n \"phone_number\": \"08031234567\",\n \"amount\": 1000\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Bill payment successful",
"data": {
"reference": "550e8400-e29b-41d4-a716-446655440000",
"merchant_reference": "bill_abc125",
"type": "debit",
"amount": "5000",
"status": "successful",
"fee": "0",
"bill": {
"category": "electricity",
"service_code": "ikeja-electric-prepaid",
"customer_identifier": "04123456789",
"customer_name": "John Doe",
"product_code": null,
"product_name": null,
"token": "1234-5678-9012-3456-7890",
"units": "42.5 kWh"
},
"created_at": "2026-10-21T10:30:00.000000Z"
}
}{
"status": "failed",
"message": "Insufficient funds, can not process this bill payment.",
"errors": {}
}{
"status": "failed",
"message": "Bill payments are temporarily unavailable. Please try again shortly.",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Your unique reference for this purchase, used for idempotency and tracking.
255"bill_abc123"
An airtime service code from Network Lookup or List Billers (category=airtime).
"mtn-airtime"
An 11 digit Nigerian mobile number, starting with 0.
^0\d{10}$"08031234567"
Amount in naira, at least 50, with at most 2 decimal places.
x >= 501000
Response
The purchase was accepted. Check data.status: successful, failed (refunded), or pending (settles later by webhook). The message is Bill payment successful, Bill payment failed or Bill payment is processing to match.
Was this page helpful?