Purchase Electricity
curl --request POST \
--url https://api.bleeprs.com/api/purchaseElectricity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1500,
"meter": "12345678910",
"phone": "08000000000",
"disco": "IKEJA_ELECTRIC",
"vendType": "PREPAID"
}
'import requests
url = "https://api.bleeprs.com/api/purchaseElectricity"
payload = {
"amount": 1500,
"meter": "12345678910",
"phone": "08000000000",
"disco": "IKEJA_ELECTRIC",
"vendType": "PREPAID"
}
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({
amount: 1500,
meter: '12345678910',
phone: '08000000000',
disco: 'IKEJA_ELECTRIC',
vendType: 'PREPAID'
})
};
fetch('https://api.bleeprs.com/api/purchaseElectricity', 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.bleeprs.com/api/purchaseElectricity",
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([
'amount' => 1500,
'meter' => '12345678910',
'phone' => '08000000000',
'disco' => 'IKEJA_ELECTRIC',
'vendType' => 'PREPAID'
]),
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.bleeprs.com/api/purchaseElectricity"
payload := strings.NewReader("{\n \"amount\": 1500,\n \"meter\": \"12345678910\",\n \"phone\": \"08000000000\",\n \"disco\": \"IKEJA_ELECTRIC\",\n \"vendType\": \"PREPAID\"\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.bleeprs.com/api/purchaseElectricity")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1500,\n \"meter\": \"12345678910\",\n \"phone\": \"08000000000\",\n \"disco\": \"IKEJA_ELECTRIC\",\n \"vendType\": \"PREPAID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bleeprs.com/api/purchaseElectricity")
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 \"amount\": 1500,\n \"meter\": \"12345678910\",\n \"phone\": \"08000000000\",\n \"disco\": \"IKEJA_ELECTRIC\",\n \"vendType\": \"PREPAID\"\n}"
response = http.request(request)
puts response.read_body{
"gatewayStatus": "00",
"gatewayMessage": "Successfully Processed",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": {
"token": "1234 5678 9101 1121 3141",
"units": 24.5,
"receiptNo": "RCPT123456789",
"commission": 25
}
}{
"gatewayStatus": "01",
"gatewayMessage": "Transaction Pending",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": {}
}{
"gatewayStatus": "88",
"gatewayMessage": "Unsucessfull",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": "No active NGN vending account found"
}{
"gatewayStatus": "88",
"gatewayMessage": "Unsucessfull",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": "Transaction in progress for this meter and amount. Please wait."
}Vending
Purchase Electricity
Purchase electricity token for a meter
POST
/
purchaseElectricity
Purchase Electricity
curl --request POST \
--url https://api.bleeprs.com/api/purchaseElectricity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1500,
"meter": "12345678910",
"phone": "08000000000",
"disco": "IKEJA_ELECTRIC",
"vendType": "PREPAID"
}
'import requests
url = "https://api.bleeprs.com/api/purchaseElectricity"
payload = {
"amount": 1500,
"meter": "12345678910",
"phone": "08000000000",
"disco": "IKEJA_ELECTRIC",
"vendType": "PREPAID"
}
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({
amount: 1500,
meter: '12345678910',
phone: '08000000000',
disco: 'IKEJA_ELECTRIC',
vendType: 'PREPAID'
})
};
fetch('https://api.bleeprs.com/api/purchaseElectricity', 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.bleeprs.com/api/purchaseElectricity",
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([
'amount' => 1500,
'meter' => '12345678910',
'phone' => '08000000000',
'disco' => 'IKEJA_ELECTRIC',
'vendType' => 'PREPAID'
]),
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.bleeprs.com/api/purchaseElectricity"
payload := strings.NewReader("{\n \"amount\": 1500,\n \"meter\": \"12345678910\",\n \"phone\": \"08000000000\",\n \"disco\": \"IKEJA_ELECTRIC\",\n \"vendType\": \"PREPAID\"\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.bleeprs.com/api/purchaseElectricity")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1500,\n \"meter\": \"12345678910\",\n \"phone\": \"08000000000\",\n \"disco\": \"IKEJA_ELECTRIC\",\n \"vendType\": \"PREPAID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bleeprs.com/api/purchaseElectricity")
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 \"amount\": 1500,\n \"meter\": \"12345678910\",\n \"phone\": \"08000000000\",\n \"disco\": \"IKEJA_ELECTRIC\",\n \"vendType\": \"PREPAID\"\n}"
response = http.request(request)
puts response.read_body{
"gatewayStatus": "00",
"gatewayMessage": "Successfully Processed",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": {
"token": "1234 5678 9101 1121 3141",
"units": 24.5,
"receiptNo": "RCPT123456789",
"commission": 25
}
}{
"gatewayStatus": "01",
"gatewayMessage": "Transaction Pending",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": {}
}{
"gatewayStatus": "88",
"gatewayMessage": "Unsucessfull",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": "No active NGN vending account found"
}{
"gatewayStatus": "88",
"gatewayMessage": "Unsucessfull",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": "Transaction in progress for this meter and amount. Please wait."
}Overview
Purchase an electricity token for a validated meter. The token will be generated instantly and can be used to recharge the meter.Request Body
Response Fields
string
Reference to store for reconciliation, support, and requerying pending transactions.
string
Electricity token for successful prepaid purchases.
number
Units returned for successful electricity purchases, when available.
string
Receipt number returned for successful purchases, when available.
number
Commission earned on the purchase, in Naira.
Status Codes
| Code | Meaning |
|---|---|
200 | Purchase completed successfully. Token details are returned in data. |
202 | Purchase accepted but not yet confirmed. Wait at least 2 minutes, then call Requery Transaction to confirm the final status. |
400 | The request could not be processed. Common causes: invalid payload, insufficient balance, or the purchase was declined by the provider. If the wallet was debited, it is automatically refunded. |
429 | Another purchase for the same meter and amount is already in progress. Retry after a short delay or with a different amount. |
Notes
- Validate the meter before purchase and let the customer confirm the returned details.
- Use the minimum and maximum amount returned by the electricity catalog.
- The
vendTypemust match the customer’s meter type. - If the API returns
gatewayStatus: "01"or an accepted pending response, wait at least 2 minutes before calling Requery Transaction. - Successful prepaid purchases include token details in the response data.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Amount of electricity to purchase (in Naira)
Example:
1500
The validated electricity meter number
Example:
"12345678910"
Customer phone number for the transaction
Example:
"08000000000"
Electricity provider productCode returned by the ElectricityList endpoint
Example:
"IKEJA_ELECTRIC"
Meter type
Available options:
PREPAID, POSTPAID Example:
"PREPAID"
Was this page helpful?