Developer API

Interact with our application to send airtime, data, electricity, etc

Authentication

Basic authentication is required to access any resource on this website.
It should be passed as a concatenated string like this:

                        
                            username:password
                        
                    
BUY AIRTIME

To buy airtime, you need the Network ID, the Amount to purchase and the Phone Number(s) to recharge. (The API supports comma separated list of phone numbers to recharge at a go

Network ID: MTN: 1, AIRTEL: 2, GLO: 3, 9MOBILE: 4, 
Then you can send the request like so:

                                
                                    METHOD: POST
                                    URL: https://isquaredata.com/api/airtime/buy/
                                    PARAMS = {
                                        'network': network_id, //e.g 1
                                        'amount': amount, //e.g 200.00
                                        'phone_number': phone //e.g 080xxxxxxxx, 081xxxxxxxx,
                                    }
                                
                            
                                
                                    RESPONSE

                                    {
                                        "code": 200,
                                        "status": "success",
                                        "message": "Transaction Successful"
                                    }
                                
                            
BUY DATA

To buy data, you need the Network ID, the Plan and the Phone Number to send the data to.

Network ID: MTN SME DATA: 1, MTN GIFTING DATA: 2, AIRTEL DATA: 3, GLO DATA: 4, 9MOBILE GIFT DATA: 5, MTN CORPORATE DATA: 7, AIRTEL SPECIAL OFFERS: 8, AIRTEL CORPORATE DATA: 9, 
GET ALL PLANS:
                            URL: https://isquaredata.com/api/data/plans/

                        
Then you can send the request like so:

                                
                                    METHOD: POST
                                    URL: https://isquaredata.com/api/data/buy/
                                    PARAMS = {
                                        'network': network_id, //e.g 1
                                        'plan': plan,
                                        'phone_number': phone //e.g 080xxxxxxxx
                                    }
                                
                            
                                
                                    RESPONSE

                                    {
                                        "service": "MTN GIFTING 500MB purchase to 08163588242",
                                        "amount": "100.00",
                                        "date": "2022-01-16T08:22:09.972372+01:00",
                                        "reference": "46589786",
                                        "old_balance": "1300.00",
                                        "new_balance": "1200.00",
                                        "comment": "OrderedDict([('network', ), ('plan', ), ('phone_number', '081*******'), ('disable_validation',
                                                False)])",
                                        "status": "success",
                                        "remark": ""
                                    }
                                
                            
BUY WAEC / NECO

To buy waec/neco, you need the Service ID, the Plan, the Amount to purchase and the Phone Number to send the data to.

Service ID: WAEC: 11, NECO: 12, NABTEB: 25, 
Then you can send the request like so:

                                
                                    METHOD: POST
                                    URL: https://isquaredata.com/api/v1/buy/education/
                                    PARAMS = {
                                        'service_id': service_id, //e.g 1
                                        'quantity': 1,
                                        'phone_number': phone_number, //e.g 080xxxxxxxx
                                        'email_address': email //e.g xyz@abc.com
                                    }
                                
                            
                                
                                    RESPONSE

                                    {
                                        "code": 200,
                                        "status": "success",
                                        "message": "Transaction Successful"
                                    }
                                
                            
CABLE TV SUBSCRIPTION
  1. Service ID:

    GOTV: 1, Startimes: 2, DSTV: 3,

  2. VERIFY SMARTCARD

                                        
                                            METHOD: POST
                                            URL: https://isquaredata.com/api/cable/verify-smartcard/
                                            PARAMS = {
                                                'service_id': service_id, //e.g 1
                                                'smartcard': xxxxxxxxxx,
                                            }
                                        
                                    
                                      
                                          RESPONSE
    
                                          {
                                              "code": 200,
                                              "status": "success",
                                              "message": "Name of Card owner"
                                          }
                                      
                                    
  3. GET LIST OF PLANS

                                    
                                        METHOD: GET
                                        URL: https://isquaredata.com/api/cable/plans/?service=id
                                    
                                
  4. BUY

                                        
                                            METHOD: POST
                                            URL: https://isquaredata.com/api/cable/buy/
                                            PARAMS = {
                                                'service': service_id,
                                                'plan': 'code' as seen in the get,
                                                'smartcard': xxxxxxxxxx
                                                'phone_number': phone_number, //e.g 080xxxxxxxx
                                                'subscription_type': 'change' or 'renew'
                                                'amount': '200.00' (optional) //Note that amount will be used if specified
                                            }
                                        
                                    
                                      
                                          RESPONSE
    
                                          {
                                            "code": 200,
                                            "status": "success",
                                            "message": "Transaction successful.Thank you."
                                          }
                                      
                                    
BUY ELECTRICITY

To buy electricity, you need the Service ID, the Meter Type ('postpaid' or 'prepaid'), the Meter Number, the Amount to purchase and the Phone Number.

Service ID:
AEDC - Abuja Electricity: 16
EKEDC – Eko Electricity: 17
IBEDC - Ibadan Electric: 18
IKEDC - Ikeja Electricity: 19
JED - Jos Electricity: 20
KAEDCO – Kaduna Electric: 21
KEDCO – Kano Electricity: 22
PHED – Port Harcourt Electrici: 23
Then you can send the request like so:


                            METHOD: POST
                            URL: https://isquaredata.com/api/v1/buy/electric/
                            PARAMS = {
                                'service_id': service_id, //e.g 1
                                'meter_type': 'postpaid' or 'prepaid'
                                'meter_number': xxxxxxxxx,
                                'phone_number': phone_number, //e.g 080xxxxxxxx
                                'amount': 1000 //amount to purchase
                            }
                        
                          
                              RESPONSE

                              {
                                  "code": 200,
                                  "status": "success",
                                  "message": "Transaction successful. Your purchased code is xxxxxxxxx. Thank you.",
                                  "purchased_code": xxxxxxxxx
                              }
                          
                        
ALL TRANSACTIONS

View all the transactions of the request user


                                METHOD: GET
                                URL: https://isquaredata.com/api/v1/transactions/
                            

                                [
                                    {
                                        "service": "MTN SME DATA MTN 1GB Data Purchase To 081620",
                                        "amount": "2500.00",
                                        "date": "2021-06-07T19:57:06.189280+01:00",
                                        "reference": "51629675",
                                        "old_balance": "9023.20",
                                        "new_balance": "6523.20",
                                        "comment": "{'network_id': 5, 'plan': '24', 'phone_number': '081xxxxxx'}",
                                        "status": "Successful"
                                    },
                                    ...
                                ]
                            

View a single transaction using transaction reference.


                              METHOD: GET
                              URL: https://isquaredata.com/api/v1/transactions/95157174/
                          

                                  {
                                      "service": "MTN SME DATA MTN 1GB Data Purchase To 081620",
                                      "amount": "2500.00",
                                      "date": "2021-06-07T19:57:06.189280+01:00",
                                      "reference": "51629675",
                                      "old_balance": "9023.20",
                                      "new_balance": "6523.20",
                                      "comment": "{'network_id': 5, 'plan': '24', 'phone_number': '081xxxxxx'}",
                                      "status": "success"
                                  }
                          
USER BALANCE

View all the transactions of the request user


                              METHOD: GET
                              URL: https://isquaredata.com/api/v1/balance/
                          

                            RESPONSE
                              {
                                "wallet_balance": 4000.0,
                                "referral_balance": 200.0,
                              }