
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
notchpay-api
Advanced tools
Notch Pay JavaScript sdk for easy payment services integrations
This project serves as a Node Package Manager (NPM) Library designed for NotchPay. The primary objective of this package is to accelerate the integration process of Notch payment APIs for Node developers. Our aim is to empower developers to concentrate on their end goals, while we handle the intricacies on their behalf.
To install the Notch Pay Node.js package, use npm:
npm install notchpay-api
Configure your Notch Pay API keys easily either through environment variables or directly within your application.
export NOTCHPAY_PUBLIC_KEY=your_public_key
export NOTCHPAY_PRIVATE_KEY=your_private_key
This package offers a comprehensive solution for seamlessly integrating Notch Pay APIs, covering essential functionalities grouped into distinct modules:
Integrating Notch Pay into your Node.js application is as easy as importing the NotchPay class and accessing the desired API functionalities:
// Your application code
import { NotchPay, NotchPayConfig } from 'notchpay-api';
const notchPayConfig: NotchPayConfig = {
endpoint: 'api.notchpay.co',
publicKey: 'your_public_key',
secretKey: 'your_secret_key',
};
const notchPay = new NotchPay(notchPayConfig);
// Now, you can use the notchPay instance to make API requests
notchPay.payments
.initialize({
amount: 500,
currency: 'XAF',
phone: '+237691622731',
})
.then(response => {
// Handle the payment response
console.log(response);
})
.catch(error => {
// Handle errors
console.error(error);
});
Handle notchpay webhooks event just by passing your callback handler to the desired event
app.post('/webhooks', (req: Request, res: Response) => {
const completePaymentCallback = (eventId: string, data: any) => {
console.log(`✔️ NotchPay completed payment event ${eventId} was received`)
}
const failedPaymentCallback = (eventId: string, data: any) => {
console.log(`✔️ NotchPay failed payment event ${eventId} was received`)
}
return notchPay.webhooks.handleEvent(req, res, {
'payment.complete': completePaymentCallback,
'payment.failed': failedPaymentCallback,
})
})
To ensure the reliability of the library, run the included test suite with the following command:
npm test
Note that Test will failed if API keys are not provided correctly
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Notch Pay JavaScript sdk for easy payment integrations
We found that notchpay-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.