By Bolarinwa Ajayi April, 2025
Monnify provides a robust and flexible payment gateway that enables businesses to accept payments through bank transfers, debit cards, USSD, and phone numbers using it one time payment service option. reliability.
To simplify payment processes on web applications, Monnify offers a JavaScript SDK that can be integrated into your web application, this is a seamless checkout process in application, providing users with multiple payment options while maintaining security and
In this guide, we will walk through the step-by-step process of integrating Monnify into your web project, breaking it down into three key phases. Adding the SDK, configuring it with the necessary credentials, and implementing the checkout functionality.
By the end of this guide, you will have a fully functional payment solution tailored to your application’s needs.
To follow along with this guide, you should have:
We also need an active Bank account to make accept payments to monnify in our application. Don’t forget to get yourself a moniepoint account number with your phone number, download moniepoint app on playstore or app store.
A payment gateway is a technology that enables businesses to accept electronic payments from customers securely and efficiently.
Are you looking for the best payment gateway to integrate into your next development project?
Monnify is one of the leading payment gateway across the globe, it designed specifically for it’s user need and their specific uses cases, Monnify offers services, from collection, transfer or disbursement , checkout payment, offline payment, SDK customize for your development language and others.
Nevertheless, A Software Development Kit (SDK) is a collection of tools and resources that help developers build applications for a specific platform or service.
Look no further. Monnify is here. Monnify got you covered.
Let get our hand dirty! Please roll up your sleeves.
To get started, we’ll need to set up our project.
First, create a Monnify account as a new user or Login as returning user.
You will be needing your unique credentials as a user, the API key and contract code, to get this you have to sign up, and visit monnify dashboard.
In your monnify dashboard, navigate or scroll to the developer section on the sidebar, after you get to see tabs, the first tab(API Keys & contract) contain all the details you need for this development.
Note: the toggle button on your dashboard indicate, what mode you are working on, the test mode(orange color) while the live mode ( green color)
This is a simple standard script to Integrate Monnify SDK.
This code is a simple webpage code which entails the HTML code, the scripts embedded, and the body. The first script, reference the SDK source `monnify.js` and a button that calls the function payWithMonnify().
<html><head><scripttype="text/javascript"src="https://sdk.monnify.com/plugin/monnify.js"></script><script>function payWithMonnify() {MonnifySDK.initialize({amount: 100,currency: "NGN",reference: new String(new Date().getTime()),customerFullName: "Funke onakoya",customerEmail: "[email protected]",apiKey: "MK_PROD_XXXX",contractCode: "XXXXX",paymentDescription: "Test World",metadata: {name: "Funke",age: 21,},incomeSplitConfig: [{subAccountCode: "MFY_SUB_342113621921",feePercentage: 50,splitAmount: 1900,feeBearer: true,},{subAccountCode: "MFY_SUB_342113621922",feePercentage: 50,splitAmount: 2100,feeBearer: true,},],onLoadStart: () => {console.log("loading has started");},onLoadComplete: () => {console.log("SDK is UP");},onComplete: function (response) {console.log(response);},onClose: function (data) {console.log(data);},});}</script></head><body><div><button type="button" onclick="payWithMonnify()">Pay With Monnify</button></div></body></html>
The MonnifySDK.initialize(), method launches the Monnify payment system with data assigned and configuration running in the browser background.
The data details are group into category in object, each has it purpose and the integration, some are mandatory (M) while some are optional (O):
finally, the call back function is listening to event happening between the modal and the web browser.
It tracks progress issue and log bugs if any is found.
I would like to introduce you to an application we’ve developed using vanilla JavaScript. It’s called Monnie Market, an e-commerce platform designed to offer users an effortless shopping experience.
I’d be happy for you to take a look and explore the flow of the application.
Monnie Market is more than just an online store; it’s an intuitive platform where shoppers can purchase products with ease, with the integration of the Monnify checkout, this provides a secure and efficient checkout service, making the transaction process smooth for both the user and the vendor.
While the primary objective is to shop for product, the deeper goal of exploring this application is to understand the intricate processes occurring in the background to facilitate each step of the user experience.
So, What does the application set up entails, the user journey through out the application show the following steps:
This Process fosters an understanding of monnify payment checkout service, and the flow of data between the user and the service.
This Process fosters an understanding of monnify payment checkout service, and the flow of data between the user and the service.
We believe this project offers an insightful look into the world of modern e-commerce and Online payment.
We would be thrilled to have you explore the application, by sharing your thoughts after checking it out!
Join our developer community on slack, so you meet other super developer hacking. This will be chance to connect with like minded developers.
Reference Resource.
You can see a full implementation of the code sample here
View full project here Monnify-sample-store, test and give honest feedback on what can be improved, Thanks.