Skip to main content

Bill Payment

  • meter_no: Meter number int
  • company: disco id int
  • amount: amount int
  • meter_type: Meter Type string
import requests
import json
payload = {'company': 'ikeja-electric',
'meter_no': '1111111111111',
'meter_type': 'prepaid',
'phone_number': '08033104248',
'amount': '1000',
'Customer_name': 'Ayo',
'Customer_address': 'Iyana Iyesi'}
user_token = 'eacf1ab727d134b254361d834c28a2bf6ab0a111'
headers = {
"Content-Type": "application/json",
"Authorization": f'Token {user_token}'
}
# jsonify the payload
data = json.dumps(payload)

Send a post request with the payload

url = "https://bigisub.ng/api/v1/meter_pay/"
res = requests.post(url, data=data, headers=headers)

Response

{
"id": 24,
"meter_no": "1111111111111",
"company": "ikeja-electric",
"meter_type": "prepaid",
"token": "Token : 26362054405982757802",
"phone_number": "08033104248",
"amount": 1000,
"pay_amount": "1050.0",
"tranx_id": "Bill2OYY--cf3b7",
"api_id": "17036579474092625189531372",
"Status": "successful",
"refund": false,
"date_created": "2023-12-27T07:19:07.544254",
"Customer_name": "Ayo",
"Customer_address": "Iyana Iyesi",
"ident": "X8nI-jtA11f026"
}

View code in other programming languages here