curl --request POST \
--url https://api.useglyde.co/v1/bills/electricity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "bill_abc125",
"service_code": "ikeja-electric-prepaid",
"meter_number": "04123456789",
"customer_name": "John Doe",
"amount": 5000,
"address": "12 Allen Avenue, Ikeja",
"phone_number": "08031234567",
"email": "[email protected]",
"access_token": "<string>"
}
'import requests
url = "https://api.useglyde.co/v1/bills/electricity"
payload = {
"reference": "bill_abc125",
"service_code": "ikeja-electric-prepaid",
"meter_number": "04123456789",
"customer_name": "John Doe",
"amount": 5000,
"address": "12 Allen Avenue, Ikeja",
"phone_number": "08031234567",
"email": "[email protected]",
"access_token": "<string>"
}
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_abc125',
service_code: 'ikeja-electric-prepaid',
meter_number: '04123456789',
customer_name: 'John Doe',
amount: 5000,
address: '12 Allen Avenue, Ikeja',
phone_number: '08031234567',
email: '[email protected]',
access_token: '<string>'
})
};
fetch('https://api.useglyde.co/v1/bills/electricity', 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/electricity",
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_abc125',
'service_code' => 'ikeja-electric-prepaid',
'meter_number' => '04123456789',
'customer_name' => 'John Doe',
'amount' => 5000,
'address' => '12 Allen Avenue, Ikeja',
'phone_number' => '08031234567',
'email' => '[email protected]',
'access_token' => '<string>'
]),
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/electricity"
payload := strings.NewReader("{\n \"reference\": \"bill_abc125\",\n \"service_code\": \"ikeja-electric-prepaid\",\n \"meter_number\": \"04123456789\",\n \"customer_name\": \"John Doe\",\n \"amount\": 5000,\n \"address\": \"12 Allen Avenue, Ikeja\",\n \"phone_number\": \"08031234567\",\n \"email\": \"[email protected]\",\n \"access_token\": \"<string>\"\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/electricity")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"bill_abc125\",\n \"service_code\": \"ikeja-electric-prepaid\",\n \"meter_number\": \"04123456789\",\n \"customer_name\": \"John Doe\",\n \"amount\": 5000,\n \"address\": \"12 Allen Avenue, Ikeja\",\n \"phone_number\": \"08031234567\",\n \"email\": \"[email protected]\",\n \"access_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useglyde.co/v1/bills/electricity")
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_abc125\",\n \"service_code\": \"ikeja-electric-prepaid\",\n \"meter_number\": \"04123456789\",\n \"customer_name\": \"John Doe\",\n \"amount\": 5000,\n \"address\": \"12 Allen Avenue, Ikeja\",\n \"phone_number\": \"08031234567\",\n \"email\": \"[email protected]\",\n \"access_token\": \"<string>\"\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 Electricity
Buy electricity for a prepaid or postpaid meter. Validate the meter with Meter Enquiry
first and send the returned customer_name. Your naira wallet is debited for the amount
plus the bill payment fee.
Prepaid purchases return the meter token in bill.token, and the units bought in
bill.units.
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/electricity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "bill_abc125",
"service_code": "ikeja-electric-prepaid",
"meter_number": "04123456789",
"customer_name": "John Doe",
"amount": 5000,
"address": "12 Allen Avenue, Ikeja",
"phone_number": "08031234567",
"email": "[email protected]",
"access_token": "<string>"
}
'import requests
url = "https://api.useglyde.co/v1/bills/electricity"
payload = {
"reference": "bill_abc125",
"service_code": "ikeja-electric-prepaid",
"meter_number": "04123456789",
"customer_name": "John Doe",
"amount": 5000,
"address": "12 Allen Avenue, Ikeja",
"phone_number": "08031234567",
"email": "[email protected]",
"access_token": "<string>"
}
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_abc125',
service_code: 'ikeja-electric-prepaid',
meter_number: '04123456789',
customer_name: 'John Doe',
amount: 5000,
address: '12 Allen Avenue, Ikeja',
phone_number: '08031234567',
email: '[email protected]',
access_token: '<string>'
})
};
fetch('https://api.useglyde.co/v1/bills/electricity', 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/electricity",
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_abc125',
'service_code' => 'ikeja-electric-prepaid',
'meter_number' => '04123456789',
'customer_name' => 'John Doe',
'amount' => 5000,
'address' => '12 Allen Avenue, Ikeja',
'phone_number' => '08031234567',
'email' => '[email protected]',
'access_token' => '<string>'
]),
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/electricity"
payload := strings.NewReader("{\n \"reference\": \"bill_abc125\",\n \"service_code\": \"ikeja-electric-prepaid\",\n \"meter_number\": \"04123456789\",\n \"customer_name\": \"John Doe\",\n \"amount\": 5000,\n \"address\": \"12 Allen Avenue, Ikeja\",\n \"phone_number\": \"08031234567\",\n \"email\": \"[email protected]\",\n \"access_token\": \"<string>\"\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/electricity")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"bill_abc125\",\n \"service_code\": \"ikeja-electric-prepaid\",\n \"meter_number\": \"04123456789\",\n \"customer_name\": \"John Doe\",\n \"amount\": 5000,\n \"address\": \"12 Allen Avenue, Ikeja\",\n \"phone_number\": \"08031234567\",\n \"email\": \"[email protected]\",\n \"access_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useglyde.co/v1/bills/electricity")
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_abc125\",\n \"service_code\": \"ikeja-electric-prepaid\",\n \"meter_number\": \"04123456789\",\n \"customer_name\": \"John Doe\",\n \"amount\": 5000,\n \"address\": \"12 Allen Avenue, Ikeja\",\n \"phone_number\": \"08031234567\",\n \"email\": \"[email protected]\",\n \"access_token\": \"<string>\"\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_abc125"
An electricity service code from List Billers (category=electricity).
"ikeja-electric-prepaid"
The customer's meter number.
50"04123456789"
The customer name returned by Meter Enquiry.
255"John Doe"
Amount in naira, at least 100, with at most 2 decimal places.
x >= 1005000
The meter's address.
255"12 Allen Avenue, Ikeja"
The customer's phone number.
20"08031234567"
The customer's email address.
Required only when Meter Enquiry returned an access_token.
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?