The WisePay API is a RESTful API that allows you to integrate bills payment services available on the WisePay platform on your application.
The API is built using restful endpoints, standard HTTP verbs which uses standard HTTP response codes to indicate if an API request is successful or not.
Services available on the WisePay API include:
DATA
AIRTIME
CABLE
ELECTRICITY
INTERNET
BULKSMS
BET FUNDING
EDUCATIONAL CARD
RECHARGE CARD
Information
Do you need help with integration?
Note
Do you need help with your integration or do you need to ask questions? Kindly create a skype group and add our skype developer account
Environment
WisePay makes use of two base API endpoint for both sandbox/development and production environment to communicate with our API's
Environment
Purpose
Base URL
Sandbox/development
The sandbox/development environment is used majorly during the product development phase. Note - every single transaction that happens via the sandbox will not. involve real money. No actual value will be spent. Coming Soon!!!
We recommend storing these credentials in environment variables or using a key management tool to keep track of them. You could use one of the following: AWS Secret Manager, HashiCorp Vault, Azure Secret Manager, and so on.
API Keys & Authorization
API Keys
Every API request to WisePay's endpoints must include an API key If you do not include an API key with your request, or if you use an incorrect or outdated key, WisePay will reject it and return an error.
WisePay offers two types of keys: test keys and live keys. When you're ready to go live, use your test keys in your sandbox or development environment, and your live keys when you're ready to go live.
When you sign up for WisePay, your API keys are generated automatically. To obtain your keys, please go to the dashboard, click on the Account Settings link, and look for your API key under the API & Webhook tabs.
You will see two api key, the one to use will be dependent on the state of your application
Authorization
Every communication with an API will require the API key, which must be sent via a header 'Authorization'. We strongly advise you to keep your API key on your own server and only make it available to team members who absolutely need to have it.
While we strongly recommend you to keep your keys private, we recognize that bad things do happen. If your key has been compromised or you suspect something has gone wrong, we strongly advise you to generate a new key right away. When you generate a new key, all previous keys become invalid, and WisePay will not honor requests sent with those keys.
Errors
For all of our transactions, WisePay employs standard HTTP response codes. The error codes range from the 200s to the 500s. Success is indicated by HTTP response codes in the 2xx range. Depending on the action taken, we will typically send you a 200 or a 201. Those in the 4xx range indicate an error that was not detected based on the information provided (e.g., a required parameter was omitted or access is denied from a resource etc.). Error codes in the 5xx range indicate a problem on our end (we are humans after all). See below:
Code
Meaning
What happened
200
OK
Everything is fine. You're cleared for take off.
201
Created
Everything is still fine, but this time around, we created a resource for you on our end. We are kind like that.
401
Unauthorized
You didn't provide a valid API key.
409
Conflict
The request conflicted with another one. There's a high likelihood that we have already treated this request.
424
Failed
Ouch! We couldn't accept this request, you omitted a required parameter or it's an outright failure from us. Don't break a sweat, reconfirm, again.
429
Too Many Request
You're hitting our API too quickly. Pump your breaks, captain.
5xx
Server Error
We messed up and we are sorry 😞, We advise that you check that you have not been debited for the transaction
Getting started
To begin using WisePay as your preferred By Now, Bill Payment solution, you must first create an account. Simply register via the our platform. When you're finished, log-on into your account, go to the account settings page, check the API & Webhook tabs, and copy your WisePay api key. We'll be needing it soon.
To begin integrating WisePay as a customer, simply place your API key in the header section of your request. When you finish this process, you'll be halfway there.
Information
Do you need help with integration?
Note
Do you need help with your integration or do you need to ask questions? Kindly create a skype group and add our skype developer account
To integrate the WisePay Buy Data API, the endpoints below applies:
Get Networks: This endpoint allows you to query all the networks that we have. It returns json array for networks.
Get Data Types: (Using the "networkId" gotten in the first step), this endpoint allows you to query all the data types that we have. It returns json array for data types.
Get Data Plans: (Using the "networkId" & "dataType" gotten in the first and second step above), this endpoint allows you to query all the data plans that we have. It returns json array for data plans.
Purchase Data: (Using the "networkId", "dataType", "planId" gotten in the first, second, third step above, and other parameters that will be shown below under purchase data), this endpoint allows you to shoot your "buy data products" request to our system. It returns json array for "Buy Data.
Get Networks
This endpoint allows you to query all the networks that we have. It returns json array for networks.
To integrate the WisePay Buy Airtime API, the endpoints below applies:
Get Networks: This endpoint allows you to query all the networks that we have. It returns json array for networks.
Get Airtime Types: (Using the "networkId" gotten in the first step), this endpoint allows you to query all the airtime types that we have. It returns json array for airtime types.
Get Airtime Rate: (Using the "networkId" & "airtimeType" gotten in the first and second step above), this endpoint allows you to query all the airtime rate that we have. It returns json array for airtime rate.
Purchase Airtime: (Using the "networkId", "airtimeType", gotten in the first, second step above, and other parameters that will be shown below under purchase airtime), this endpoint allows you to shoot your "buy airtime products" request to our system. It returns json array for "Buy airtime.
Get Networks
This endpoint allows you to query all the networks that we have. It returns json array for networks.
To integrate the WisePay Cable TV API, the endpoints below applies:
Get Cable Types: This endpoint allows you to query all the Cables that we have. It returns json array for Cables.
Get Cable Packages: (Using the "cableId" gotten in the first step), this endpoint allows you to query all the cable packages that we have. It returns json array for cable packages.
Validate SmartCardNo: This endpoint allows you to validate SMARTCARD or IUC number. It returns json array for the validated details.
Cable TV Subscription: (Using the "cableId", "packageId", gotten in the first, second step above, and other parameters that will be shown below under Cable TV Subscription), this endpoint allows you to shoot your "Cable TV Subscription" request to our system. It returns json array for "Cable TV Subscription.
Get Cable Types
This endpoint allows you to query all the cables that we have. It returns json array for cable.
To integrate the WisePay Electricity Recharge API, the endpoints below applies:
Get Disco Types: This endpoint allows you to query all the Discos that we have. It returns json array for Discos.
Get Meter Types: This endpoint allows you to query all the Meter Types that we have. It returns json array for Meter Types.
Get Electricity Rate: This endpoint allows you to query all the electricity rate that we have. It returns json array for electricity rate.
Validate meterNo: This endpoint allows you to validate METER number. It returns json array for the validated details.
Electricity Recharge: (Using the "discoType", "meterType", gotten in the first, second step above, and other parameters that will be shown below under Electricity Recharge), endpoint allows you to shoot your "Electricity Recharge products" request to our system. It returns json array for "Electricity Recharge".
Get Disco Types
This endpoint allows you to query all the Discos that we have. It returns json array for Discos.
To integrate the WisePay Bulksms API, the endpoints below applies:
Get Bulksms & Types: This endpoint allows you to query all the Bulksms Types and Price that we have. It returns json array for Bulksms.
Send Bulksms: (Using the "BulksmsType", gotten in the first, step above, and other parameters that will be shown below under Bulksms), endpoint allows you to shoot your "Bulksms products" request to our system. It returns json array for "Bulksms".
Get Bulksms & Types
This endpoint allows you to query all the Bulksms Types and Price that we have. It returns json array for Bulksms.
To integrate the WisePay Buy Internet Data API, the endpoints below applies:
Get Internet Types: This endpoint allows you to query all the Internet types that we have. It returns json array for internet types.
Get Internet Data Plans: (Using the "internetTypeId" gotten in the first step above), this endpoint allows you to query all the internet data plans that we have. It returns json array for internet data plans.
Purchase Internet Data: (Using the "internetTypeId", "planId" gotten in the first, second, step above, and other parameters that will be shown below under purchase internet data), this endpoint allows you to shoot your "buy Internet data products" request to our system. It returns json array for "Buy Internet Data.
Get Internet Types
This endpoint allows you to query all the internet types that we have. It returns json array for internet types.
To integrate the WisePay Buy Educational Card API, the endpoints below applies:
Get Educational Card Types: This endpoint allows you to query all the Educational Card types that we have. It returns json array for educational card types.
Get Educational Card Price: (Using the "eduCardTypeId" gotten in the first step above), this endpoint allows you to query all the educational card price that we have. It returns json array for educational card price
Purchase Educational Card: (Using the "eduCardTypeId", gotten in the first, step above, and other parameters that will be shown below under purchase educational card), this endpoint allows you to shoot your "buy Educational Card products" request to our system. It returns json array for "Buy Educational Card.
Get Educational Card Types
This endpoint allows you to query all the Educational Card types that we have. It returns json array for Educational Card types.
To integrate the WisePay Buy Recharge Card API, the endpoints below applies:
Get Networks: This endpoint allows you to query all the networks that we have. It returns json array for networks.
Get Recharge Card Percent: (Using the "network" gotten in the first step above), this endpoint allows you to query all the Recharge card percent that we have. It returns json array for Recharge card percent
Purchase Recharge Card: (Using the "network", gotten in the first, step above, and other parameters that will be shown below under purchase Recharge card), this endpoint allows you to shoot your "buy Recharge Card products" request to our system. It returns json array for "Buy Recharge Card.
Get Networks
This endpoint allows you to query all the networks that we have. It returns json array for networks.
To integrate the WisePay Buy Bet API, the endpoints below applies:
Get Bet Types: This endpoint allows you to query all the Bet types that we have. It returns json array for Bet types.
Get Bet Discount: (Using the "betType" gotten in the first step above), this endpoint allows you to query all the Bet discount that we have. It returns json array for Bet discount.
Validate Bet Customer Id: (Using the "betType" and "customerId" gotten in the first step above), this endpoint allows you to validate the customerId of the bet type. It returns json array for the validated details
Fund Bet: (Using the "betType", gotten in the first, step above, and other parameters that will be shown below under fund bet), this endpoint allows you to shoot your "fund bet products" request to our system. It returns json array for "Fund Bet.
Get Bet Types
This endpoint allows you to query all the Bet types that we have. It returns json array for Bet types.
This section contains the recommended format of generating reference
Reference Format
The Reference should be a string in the unix format YYYYMMDDHHII consisting of today’s date + current hour and minute (e.g: 202306280331) and can be concatenated with any other alphanumeric string as desired (e.g: 202306280331Y5WSUG49ERTYGT or 2023062803314738492849).
Note
MUST BE 25 CHARACTERS MINIMUM & 30 CHARCTERS MAXIMUM
FIRST 12 CHARACTERS MUST BE NUMERIC
FIRST 12 CHARACTERS MUST COMPRISE OF TODAY’S DATE
DATE & TIME SHOULD BE IN AFRICA/LAGOS Timezone OR GMT +1
Example: 202306280331Y5WSUG49ERTYGT
Introduction
Learn how to listen to events whenever certain actions occur on your integration.
What are webhooks?
During a transaction lifecycle, WisePay sends events that your application can listen to. A webhook is an accessible URL on your server to which we send payloads. For example, WisePay sends webhook events when a transaction has been initiated, failed and when it's successful
By using webhooks, you can tightly integrate your backend application with WisePay. The platform currently supports one kind of webhook: Data. Webhook follow a common set of rules:
Webhook should be reachable from the public internet. During development and you are on localhost, tunnelling services like Ngrok are supported.
Webhook should accept HTTP POST requests with JSON payload
Webhook should respond with http response codes 200
Webhook should respond as fast as possible.
Webhook should be ready to accept the same call multiple times: in case of network or remote server failure.
Responding to an event
You should respond to a webhook event with a 200 OK. We consider this an acknowledgement of your application. If your application responds with any status outside of the 2xx range, we will consider it unacknowledged
Supported Event
DATA
{
"status": true,
"code": 200,
"data": {
"type": "Data",
"message": "Dear Customer, You have successfully shared 500MB Data to 23481663****2. 9961.07 31\\/08\\/2023. Thankyou",
"yourReference": "WPY20232806094208VBLWM308",
"ourReference": "WPY20232806094208VBLWM308"
},
"time": "2023-28-06 09:42:16"
}
AIRTIME
{
"status": true,
"code": 200,
"data": {
"type": "Airtime",
"message": "You have topped up N10.00 to 2348*****7382. Your balance is now N477,204.00. ref: 2023062720284751203431431",
"yourReference": "WPY202328061236344C0YP834",
"ourReference": "WPY202328061236344C0YP834"
},
"time": "2023-28-06 12:36:41"
}
Idempotent Webhooks
We strongly suggest you make webhooks idempotent. That means, you should always check the webhook reference and make sure that you're not processing the same webhook more than once.
Setting up webhook
In other to take advantage of webhooks, you will have to first set up a publicly available URL that WisePay can have access to. To set up one, kindly go to your dashboard, click on the Account Settings link and check under the API & Webhook tabs, there, you will find an input box for your webhook.
Utilities
Section intro goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque finibus condimentum nisl id vulputate. Praesent aliquet varius eros interdum suscipit. Donec eu purus sed nibh convallis bibendum quis vitae turpis. Duis vestibulum diam lorem, vitae dapibus nibh facilisis a. Fusce in malesuada odio.
Section Item 5.1
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Section Item 5.2
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Section Item 5.3
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Web
Section intro goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque finibus condimentum nisl id vulputate. Praesent aliquet varius eros interdum suscipit. Donec eu purus sed nibh convallis bibendum quis vitae turpis. Duis vestibulum diam lorem, vitae dapibus nibh facilisis a. Fusce in malesuada odio.
Section Item 6.1
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Section Item 6.2
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Section Item 6.3
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Mobile
Section intro goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque finibus condimentum nisl id vulputate. Praesent aliquet varius eros interdum suscipit. Donec eu purus sed nibh convallis bibendum quis vitae turpis. Duis vestibulum diam lorem, vitae dapibus nibh facilisis a. Fusce in malesuada odio.
Section Item 7.1
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Section Item 7.2
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Section Item 7.3
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Resources
Section intro goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque finibus condimentum nisl id vulputate. Praesent aliquet varius eros interdum suscipit. Donec eu purus sed nibh convallis bibendum quis vitae turpis. Duis vestibulum diam lorem, vitae dapibus nibh facilisis a. Fusce in malesuada odio.
Section Item 8.1
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Section Item 8.2
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.
Section Item 8.3
Vivamus efficitur fringilla ullamcorper. Cras condimentum condimentum mauris, vitae facilisis leo. Aliquam sagittis purus nisi, at commodo augue convallis id. Sed interdum turpis quis felis bibendum imperdiet. Mauris pellentesque urna eu leo gravida iaculis. In fringilla odio in felis ultricies porttitor. Donec at purus libero. Vestibulum libero orci, commodo nec arcu sit amet, commodo sollicitudin est. Vestibulum ultricies malesuada tempor.