Purchase Bill / Vend Token
curl --request POST \
--url https://api-local.handle.ng/api/v1/bill-payment/purchase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "ELECTRICITY",
"billerCode": "AEDC",
"recipientId": "0219927013063",
"amount": 1000,
"canonicalKey": "electricity:aedc:prepaid",
"metadata": {
"billPaymentProductId": "NOTICE_OF_OFFENCE"
}
}
'import requests
url = "https://api-local.handle.ng/api/v1/bill-payment/purchase"
payload = {
"category": "ELECTRICITY",
"billerCode": "AEDC",
"recipientId": "0219927013063",
"amount": 1000,
"canonicalKey": "electricity:aedc:prepaid",
"metadata": { "billPaymentProductId": "NOTICE_OF_OFFENCE" }
}
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({
category: 'ELECTRICITY',
billerCode: 'AEDC',
recipientId: '0219927013063',
amount: 1000,
canonicalKey: 'electricity:aedc:prepaid',
metadata: {billPaymentProductId: 'NOTICE_OF_OFFENCE'}
})
};
fetch('https://api-local.handle.ng/api/v1/bill-payment/purchase', 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-local.handle.ng/api/v1/bill-payment/purchase",
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([
'category' => 'ELECTRICITY',
'billerCode' => 'AEDC',
'recipientId' => '0219927013063',
'amount' => 1000,
'canonicalKey' => 'electricity:aedc:prepaid',
'metadata' => [
'billPaymentProductId' => 'NOTICE_OF_OFFENCE'
]
]),
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-local.handle.ng/api/v1/bill-payment/purchase"
payload := strings.NewReader("{\n \"category\": \"ELECTRICITY\",\n \"billerCode\": \"AEDC\",\n \"recipientId\": \"0219927013063\",\n \"amount\": 1000,\n \"canonicalKey\": \"electricity:aedc:prepaid\",\n \"metadata\": {\n \"billPaymentProductId\": \"NOTICE_OF_OFFENCE\"\n }\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-local.handle.ng/api/v1/bill-payment/purchase")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"ELECTRICITY\",\n \"billerCode\": \"AEDC\",\n \"recipientId\": \"0219927013063\",\n \"amount\": 1000,\n \"canonicalKey\": \"electricity:aedc:prepaid\",\n \"metadata\": {\n \"billPaymentProductId\": \"NOTICE_OF_OFFENCE\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-local.handle.ng/api/v1/bill-payment/purchase")
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 \"category\": \"ELECTRICITY\",\n \"billerCode\": \"AEDC\",\n \"recipientId\": \"0219927013063\",\n \"amount\": 1000,\n \"canonicalKey\": \"electricity:aedc:prepaid\",\n \"metadata\": {\n \"billPaymentProductId\": \"NOTICE_OF_OFFENCE\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": "COMPLETED",
"reference": "HDL-BILL-1727788412991-842",
"providerCode": "KUDA",
"providerReference": "KD-TX-9847120938",
"token": "4819-2049-1829-4019-3382",
"units": "34.5 kWh",
"message": "Transaction Successful",
"amount": 1000,
"recipientId": "0219927013063"
}Handle VAS & Bill Payments
Purchase Bill / Vend Token
Execute bill payment, token purchase, or data bundle topup with automatic account debit and margin-guarded failover.
POST
/
bill-payment
/
purchase
Purchase Bill / Vend Token
curl --request POST \
--url https://api-local.handle.ng/api/v1/bill-payment/purchase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "ELECTRICITY",
"billerCode": "AEDC",
"recipientId": "0219927013063",
"amount": 1000,
"canonicalKey": "electricity:aedc:prepaid",
"metadata": {
"billPaymentProductId": "NOTICE_OF_OFFENCE"
}
}
'import requests
url = "https://api-local.handle.ng/api/v1/bill-payment/purchase"
payload = {
"category": "ELECTRICITY",
"billerCode": "AEDC",
"recipientId": "0219927013063",
"amount": 1000,
"canonicalKey": "electricity:aedc:prepaid",
"metadata": { "billPaymentProductId": "NOTICE_OF_OFFENCE" }
}
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({
category: 'ELECTRICITY',
billerCode: 'AEDC',
recipientId: '0219927013063',
amount: 1000,
canonicalKey: 'electricity:aedc:prepaid',
metadata: {billPaymentProductId: 'NOTICE_OF_OFFENCE'}
})
};
fetch('https://api-local.handle.ng/api/v1/bill-payment/purchase', 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-local.handle.ng/api/v1/bill-payment/purchase",
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([
'category' => 'ELECTRICITY',
'billerCode' => 'AEDC',
'recipientId' => '0219927013063',
'amount' => 1000,
'canonicalKey' => 'electricity:aedc:prepaid',
'metadata' => [
'billPaymentProductId' => 'NOTICE_OF_OFFENCE'
]
]),
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-local.handle.ng/api/v1/bill-payment/purchase"
payload := strings.NewReader("{\n \"category\": \"ELECTRICITY\",\n \"billerCode\": \"AEDC\",\n \"recipientId\": \"0219927013063\",\n \"amount\": 1000,\n \"canonicalKey\": \"electricity:aedc:prepaid\",\n \"metadata\": {\n \"billPaymentProductId\": \"NOTICE_OF_OFFENCE\"\n }\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-local.handle.ng/api/v1/bill-payment/purchase")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"ELECTRICITY\",\n \"billerCode\": \"AEDC\",\n \"recipientId\": \"0219927013063\",\n \"amount\": 1000,\n \"canonicalKey\": \"electricity:aedc:prepaid\",\n \"metadata\": {\n \"billPaymentProductId\": \"NOTICE_OF_OFFENCE\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-local.handle.ng/api/v1/bill-payment/purchase")
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 \"category\": \"ELECTRICITY\",\n \"billerCode\": \"AEDC\",\n \"recipientId\": \"0219927013063\",\n \"amount\": 1000,\n \"canonicalKey\": \"electricity:aedc:prepaid\",\n \"metadata\": {\n \"billPaymentProductId\": \"NOTICE_OF_OFFENCE\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": "COMPLETED",
"reference": "HDL-BILL-1727788412991-842",
"providerCode": "KUDA",
"providerReference": "KD-TX-9847120938",
"token": "4819-2049-1829-4019-3382",
"units": "34.5 kWh",
"message": "Transaction Successful",
"amount": 1000,
"recipientId": "0219927013063"
}Executes an end-to-end bill payment or utility token purchase.
Transaction Lifecycle
- Mandate Check & Direct Debit: Handle checks the user’s active bank account mandate and initiates direct settlement via OnePipe.
- Provider Dispatch: Once debit succeeds, the request is sent to the primary provider (Remita / Kuda).
- Resilient Failover: If the primary provider fails, Handle automatically shifts fulfillment to a secondary provider without double-debiting the user.
- Token Delivery: The generated 20-digit token (for prepaid power), PIN (for exams), or confirmation receipt is returned immediately.
Sample Success Response
{
"success": true,
"transactionId": "HDL-BILL-1790800000-482",
"provider": "kuda",
"token": "4819-2049-1829-9401-2910",
"units": "45.2 kWh",
"amount": 5000,
"status": "COMPLETED",
"message": "Transaction fulfilled successfully."
}
Authorizations
Body
application/json
Available options:
GOVERNMENT, ELECTRICITY, AIRTIME, DATA, INTERNET, CABLE_TV, UTILITIES, EDUCATION, FLIGHTS, BETTING, GAMING, SOLAR, TRANSPORT, ESIM, TAXES, HOSPITALS, INSURANCE, RELIGIOUS, ASSOCIATIONS, FINANCIAL_SERVICES, CREDIT_LOANS, MICRO_PENSIONS, INVOICE, GIFT_CARDS, SHOPPING, FOOD_DINING, LIFESTYLE_BEAUTY, HOME_LIVING Example:
"ELECTRICITY"
Response
200 - application/json
Vend receipt, token, and transaction reference