Easepay NodeJs SDK is a library that allows you to easily interact with the Easepay API. It provides a simple and easy-to-use interface for the Easepay API. The SDK is built on top of the Axios library and provides a simple interface for making requests to the Easepay API.
- Create an account on Easepay
- Create an API key on the API settings page
- Install the SDK using npm
npm install @easepay/sdk
- Use the SDK to interact with the Easepay API
const { Easepay, Currency } = require('@easepay/sdk');
const easepay = new Easepay(process.env.EASEPAY_API_KEY, process.env.EASEPAY_API_SECRET);
const response = await easepay.createPayment({
amount: 31550,
currency: Currency.NGN,
redirectUrl: 'https://example.com/redirect',
callbackUrl: 'https://example.com/callback',
metadata: {
customerId:"50193eb8-40ba-4280-b6e4-7077f7f5626e" ,
orderId: "6614c062-cbf5-47a0-911e-8e3d30e1c900"
}
}).catch((error) => {
console.error(error.message);
});
For test and development purposes, you can use the test API key and secret provided in the API settings page
The SDK provides a simple interface for making requests to the Easepay API. The following methods are available:
createPayment
: Create a new paymentgetPayment
: Get a payment by IDgetPayments
: Get a list of paymentscreatePayout
: Create a new payoutgetPayout
: Get a payout by IDgetPayouts
: Get a list of payouts
- Clone the repository
git clone https://github.com/easepay/easepay-sdk-nodejs.git
- Install dependencies
npm install
- Build the SDK
npm run build
- Run tests
npm run test
This project is licensed under the MIT License - see the Licesnse file for details