API Integration Documentation
Introduction
This documentation provides a guide for integrating various services offered by BofiaSub into your new or existing system. BofiaSub offers APIs for services such as airtime purchase, data subscription, cable TV, electricity bill payments, and result checker services.
API Key
To access BofiaSub APIs, you need an API key. You can obtain this key by reaching out to BofiaSub.
Sample API key:
5738068f03b44f1e601712e12a8ce7e36551d7bbd5f8b
1. Check Account Balance
Endpoint:
https://bofiasub.com/api/details
Request Method: POST
Payload Example:
$payload = array(
'token' => "5738068f03b44f1e601712e12a8ce7e36551d7bbd5f8b"
);
Sample Response:
{
"status": "success",
"status_code": 200,
"balance": 1000,
"mobile": "0813256*****",
"email": "[email protected]"
}
2. Purchase Data
Endpoint:
https://bofiasub.com/api/data
Request Method: POST
Payload Example:
$payload = array(
'token' => "5738068f03b44f1e601712e12a8ce7e36551d7bbd5f8b",
'network' => 'MTN',
'plan_code' => '500',
'mobile' => '0813905******',
'request_id' => 'REF-UNIQUE723723828932',
);
Sample Response:
{
"status": "success",
"status_code": 200,
"old_balance": 1000,
"new_balance": 850,
"time": "11-Jul-2022 10:47AM",
"amountPaid": 150,
"message": "MTN 500MB - N150 Data Purchase Successful On 0813905******"
}
3. Purchase Airtime
Endpoint:
https://bofiasub.com/api/airtime
Request Method: POST
Payload Example:
$payload = array(
'token' => "5738068f03b44f1e601712e12a8ce7e36551d7bbd5f8b",
'network' => 'MTN',
'amount' => 100,
'mobile' => '0813905******',
'request_id' => 'REF-UNIQUE723723828932',
);
Sample Response:
{
"status": "success",
"status_code": 200,
"old_balance": 1000,
"new_balance": 902,
"time": "11-Jul-2022 10:47AM",
"amountPaid": 98,
"discount": 2,
"message": "MTN 100 Airtime Purchase Successful On 0813905******"
}
4. Verify Decoder/Meter No
Endpoint:
https://bofiasub.com/api/verifyiuc
Request Method: POST
Payload Example:
$payload = array(
'service_id' => 'GOTV',
'service_type' => 'prepaid',
'service_number' => '7056882******',
);
Sample Response:
{
"status": "success",
"status_code": 200,
"message": "Ajansare Adenlekoko"
}
5. Purchase Cable TV Subscription
Endpoint:
https://bofiasub.com/api/tv
Request Method: POST
Payload Example:
$payload = array(
'token' => "5738068f03b44f1e601712e12a8ce7e36551d7bbd5f8b",
'service_id' => 'GOTV',
'plan_code' => '601',
'service_number' => '703905******',
'request_id' => 'REF-UNIQUE723723828932',
);
Sample Response:
{
"status": "success",
"status_code": 200,
"old_balance": 10000,
"new_balance": 4500,
"time": "11-Jul-2022 10:47AM",
"amountPaid": 5500,
"message": "Gotv Supa Purchase Successful On 703905******"
}
6. Purchase Electricity Token
Endpoint:
https://bofiasub.com/api/electricity
Request Method: POST
Payload Example:
$payload = array(
'token' => "5738068f03b44f1e601712e12a8ce7e36551d7bbd5f8b",
'service_id' => 'ikeja-electric',
'amount' => '1000',
'service_number' => '409257******',
'service_type' => 'prepaid',
'request_id' => 'REF-UNIQUE723723828932',
);
Sample Response:
{
"status": "success",
"status_code": 200,
"old_balance": 2000,
"new_balance": 1010,
"time": "11-Jul-2022 10:47AM",
"amountPaid": 990,
"message": "N1000 Ikeja Token Purchase Successful On 409257******(Token 5620 5620 3147 3091)"
}
7. Check Exam Results
Endpoint:
https://bofiasub.com/api/education
Request Method: POST
Payload Example:
$payload = array(
'token' => "5738068f03b44f1e601712e12a8ce7e36551d7bbd5f8b",
'service_id' => 'WAEC',
'request_id' => 'REF-UNIQUE723723828932',
);
Sample Response:
{
"status": "success",
"status_code": 200,
"old_balance": 4000,
"new_balance": 2200,
"time": "11-Jul-2022 10:47AM",
"amountPaid": 1800,
"message": "Waec E-Pins Purchase Successful On 0813905******(PIN-788323922)",
"pin": "PIN-788323922"
}
Conclusion
This documentation provides a comprehensive guide to integrating BofiaSub APIs into your system for various services. Ensure you follow the provided examples for each service to successfully implement the integration. If you encounter any issues or have questions, feel free to reach out to BofiaSub for assistance.