gettopup merchant API
API Documentation
Public docs show the sandbox base URL for testing. Live production endpoints unlock after your API access is approved.
JSON over HTTPSSandbox examplesApprove for live
Sandbox docs mode
Sandbox base URL
https://sandbox.gettopup.com.ngPOST
/api/billpayment/Buy Electricity
POST — pay electricity bills (prepaid / postpaid)
api:readRequired headers
| Header | Value | Required |
|---|---|---|
| Authorization | Token YOUR_API_TOKEN | Yes |
| Content-Type | application/json | Yes (POST/PUT) |
| Accept | application/json | Recommended |
Endpoint
POST
https://sandbox.gettopup.com.ng/api/billpayment/Parameters / payload fields
| Field | Type | Required | Description |
|---|---|---|---|
| disco_name | integer | Yes | Disco ID — see table below |
| amount | number/string | Yes | Amount in Naira |
| meter_number | string | Yes | Validated meter number |
| MeterType | string/int | Yes | PREPAID (1) or POSTPAID (2) |
Code samples
cURL
curl -X POST "https://sandbox.gettopup.com.ng/api/billpayment/" \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"disco_name":1,"amount":"2000","meter_number":"45012345678","MeterType":"PREPAID"}'Request body (JSON)
JSON
{
"disco_name": 1,
"amount": "2000",
"meter_number": "45012345678",
"MeterType": "PREPAID"
}Response sample (200)
JSON
{
"ident": "BILL1234567890",
"Status": "successful",
"amount": "2000.00",
"token": "1234-5678-9012-3456",
"units": "45.2 kWh"
}Reference table
| Disco name | ID |
|---|---|
| Ikeja Electric | 1 |
| Eko Electric | 2 |
| Kano Electric | 3 |
| Port Harcourt Electric | 4 |
| Jos Electric | 5 |
| Ibadan Electric | 6 |
| Kaduna Electric | 7 |
| Abuja Electric | 8 |
Sandbox examples only — live host and production keys appear after API access is approved.