https://github.com/vectormike/cyberpay
Nodejs API wrapper for CyberPay
https://github.com/vectormike/cyberpay
Last synced: about 1 year ago
JSON representation
Nodejs API wrapper for CyberPay
- Host: GitHub
- URL: https://github.com/vectormike/cyberpay
- Owner: Vectormike
- License: mit
- Created: 2020-05-05T00:40:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T16:14:19.000Z (about 3 years ago)
- Last Synced: 2025-03-02T12:16:52.703Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 554 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CyberPay Node.js Library
[](https://circleci.com/gh/circleci/circleci-docs)



Nodejs API wrapper for [CyberPay](https://cyberpay.net.ng/).
This library provides access to the CyberPay API from applications written in server-side JavaScript.
## CyberPay Endpoints/Services exposed by the library
- Bank
- BankUSSD
- BillByWallet
- Biller
- BillPayment
- Business
- Channels
- Dashboard
- DirectDebit
- FundTransfer
- Integration
- MandateProduct
- NibssPaPlus
- Nip
- Partner
- Payment
- Payout
- Provider
- Transaction
- TSA
- WalletTopUp
## Installation
```sh
npm install cyberpay --save
#or
yarn add cyberpay
```
## Usage
This package requires configuration with your account's secret key in the [CyberPay Dahboard](https://cyberpay.net.ng/)
Using ES modules and `async`/`await`:
```js
import CyberPay from 'cyberpay';
const cyberpay = new CyberPay({
integrationKey: process.env.INTEGRATION_KEY,
});
try {
const res = await cyberpay.payment.verify(transactionReference);
// Verify payment
if (res.status === 200) {
// Successful
}
} catch (err) {
if (!err.response) {
// No response from the server
// Bad network
} else {
// Response was returned from the server
// ...
}
}
```
### Payment
Operations relating to payment
#### Payment with token
`const response = await cyberpay.payment.paywithtoken(options);`
#### Payment with card
`const response = await cyberpay.payment.paywithtoken(options);`
### Bank
Activities has to do with basic information about banks integrated
#### Get all integrated banks
`const response = await cyberpay.bank();`
### Channels
Channels associated
#### Retrieves active channels
`const response = await cyberpay.fetchActiveChannels();`
### Dashboard
Display transactions on dashboard
#### Display transactions by date
`const response = await cyberpay.fetchTransactionsToDashboard(options);`
## Contributing
- You can contribute by extending the README file to contain more examples and explanations of how to use the package.
## Authors
- [Victor Jonah](https://www.linkedin.com/in/victor-jonah/)
## License
The code is available as open source under the terms of the
[MIT License](https://opensource.org/licenses/MIT)