Pay Internet Data bundles Open API Uganda
Pay Internet Data bundles Open API Uganda – EasyPay provides an easy Restful API that makes the process of paying your internet bundles a breeze. This api supports the following providers in Uganda; Africell, Smile and ROKE telecom.
API stands for application programming interface. It can be interfaced by developers of all kinds of apps or systems to pay the internet data bundles within Uganda.
Open Internet Data bundles Requirements
- Easypay account; First things first, you need to register for an easypay account. registration is free and painless. Register for an easypay account. Once you have registered and signed in, you will have to enable your API from within the app, so as you can get your credentials in real time. The process is explained in detail below.
- The API is very simple and live so there is no sandbox environment. This helps you get integrated in a matter of minutes,test and get the feel of the API. The Gotcha. By default all api accounts are limited to bill payments worth 100USD/month for the purpose of testing. To remove this limitation, you will have to contact us with your company details (KYC) and fill in the API application form we provide.
Enable Pay Internet bundles Bill Payments API within Easypay Wallet
1. Go to https://www.easypay.co.ug/v3/ and create an account.
2. Sign in and tap the API button shown on the home screen as shown in the image to the left. 3. The enable API screen will load up and offer you a green button to enable API. Tap this button and we proceed to creating and enabling API services for your account. |
|
Step 1 – Fill in your Information
Using instant payment notification model, all your transactions should be marked as pending and only be marked as confirmed from this notification. It is also known as the callback url. After you click save, your API will be enabled and live. You will be given a client Key and client Password that you will need for authenticating the API functions below.
|
Easypay Bill API Endpoint
URL – This is the url you will call to access the API. It is also known as the api entry point or end-point. https://www.easypay.co.ug/api/
Please make sure your have an SSL certificate installed before calling above URL. Your origin must be https.
Anatomy of Request
The API expects a POST request with a JSON encoded string of request. Every call to the API must have at least the format below. Some methods require extra fields depending on the call.
Payload
{
"username": "clientId",
"password": "clientSecret",
"action":"paybill",
"provider":"smile_inet",
"bundleId":"19",
"amount":"1000",
"account":"2114....."
}
username |
This is the API clientId that you are given within app after you enable API. see above |
password |
This is the API secret that you are given within app after you enable API. see above |
action |
This is the API method being called. In this case it will always be paybill |
provider |
This is the service provider in this case it can be smile_inet, africell_inet or roke_inet |
Anatomy of Response – Internet Data bundles API Uganda
A success response comes in the following JSON format . You have to test the success field to either 1 for success or 0 for failed.
Successful Response
{
"success": 1,
"data": string,
"details":object
}
success | This is an integer describing response. 1 for success, 0 for failed transaction |
data | Human friendly formatted string containing transaction details. |
details | Object containing transaction details like receipt number, date etc |
Failed Response
{
"success": 0,
"errormsg": "error message here describing failure"
}
Internet Data bundles API Uganda – Process Flow
- Get package bundles and ask the user to pick his/her desired package. This can be done will paybillbundles method.
- Request account number – This process involves asking the user to provide their respective account number.
- Validate Customer – This process checks with internet bundles system if the provided account is a valid account. If successful it returns customer name, any outstanding amounts etc. Using api you can use the paybilladvice method to return these details.
- Pay Bill – This process does the actual bill payment.
Internet Data bundles API Uganda – API methods
paybillbundlesThis method returns a list of internet data bundles supported by the service provider. You are supposed to display these to the user giving him a choice to choose his/her desired package. POST URL: https://www.easypay.co.ug/api/ |
|
Payload{ |
Success Result
Failure Result
|
paybilladviceThis method is called when a user wants to check and validate the users provided account number. POST URL: https://www.easypay.co.ug/api/ |
|
Payload{ |
Success Result
Failure Result
|
paybillThis method is called when a user wants to pay the actual bill. POST URL: https://www.easypay.co.ug/api/ |
|
Payload{ |
Success Result
Failure Result
|
paybillstatusThis method is called when a user wants to pay find out the current status of bill against the reference they provided above. It can be used for auto-reconciliation. In response take note of the status property. It tells you the status of order. Incase of ‘Success’ it also return order receipts. POST URL: https://www.easypay.co.ug/api/ |
|
Payload{ |
Success Result
Failure Result
|
Other methods worth looking into;
checkbalanceThis method is called you want to know your current balance at easypay. You can use this method to notify you that your balance is running low. That way you can ensure you do not run out of float. POST URL: https://www.easypay.co.ug/api/ |
|
Payload{ |
Success Result
Failure Result
|
Internet Data Bundles Commissions
The listing below is the standard Internet data bundles payment commissions. If you have sufficient volume then they can be modified on a case by case scenario. We pay you commissions of the transaction amount in real time.
Provider | Commission Percentage |
---|---|
smile | 0.80% |
roke | 2.40% |
africell | 4.00% |