
🏛 EquityJs
A light Node.js Library For The Equity Bank's Eazzy API
Documentation
Installation
$ npm install equityjs --save
Usage
const Equity = require('equityjs');
const equity = new Equity({
consumerKey: 'YOUR_CONSUMER_KEY',
consumerSecret: 'YOUR_CONSUMER_SECRET'
);
Both are required parameters. You can obtain your keys from here, by creating an app.
Refer to examples.js for more usage indformation.
API
All Sandbox Endpoints are supported at the moment. In-production Endpoints will be added soon.
Callback from API calls return 2 parameters, that is:
The response is always the original JSON Object sent by the Equity API
An example of a callback function:
function callback (e, r) {
if (e) {
console.error(e);
else {
console.log(r);
Methods
- All parameters for all methods are required!
- All
opts
take a JSON Object structure!
Identity API
equity.changePassword(opts, callback)
Parameter | Description |
---|
merchantId | Your merchant ID |
currentPassword | Your current password |
newPassword | Your new password |
equity.getToken(opts, callback)
Parameter | Description |
---|
username | Merchant Username, provided by Equity Bank |
password | Merchant Password, provided by Equity Bank |
grant_type | OAuth 2.0 Grant Type - must be 'password' |
Transaction API
equity.purcahseAirtime(opts, callback)
Parameter | Description |
---|
mobileNumber | Mobile Number For Which To Purchase Airtime |
amount | Airtime Amount |
reference | Airtime Reference |
telco | Network Provider |
equity.createPayment(opts, callback)
Parameter | Description |
---|
mobileNumber | Mobile Number For Which To PSend Money |
amount | Amount |
description | Transaction Description |
type | Type |
auditNumber | Audit Number |
equity.paymentStatus(opts, callback)
Parameter | Description |
---|
transactionId | TransactionId |
equity.onlineRemit(opts, callback)
Parameter | Description |
---|
transactionReference | Transaction Reference |
senderName | Sender Name |
accountNumber | Account Number |
bicCode | BIC CODE |
mobileNumber | Mobile Number |
walletName | Wallet Name |
bankCode | Bank Code |
branchCode | Branch Code |
countryCode | Country Code |
currencyCode | Currency Code |
amount | Ammount |
paymentType | Payment Type |
paymentReferences | Payment References |
remarks | Remarks |
Issues And Contribution
Fork the repository and submit a pull request for whatever change you want to be added to this project. If you have any questions, just open an issue.