mtn-momo-api
Version:
The MTN-Momo-API is an npm package that provides a convenient and simplified way to interact with the MoMo (Mobile Money) API for making financial transactions. It abstracts the complexities of the API and offers a streamlined interface for requesting pay
23 lines (21 loc) • 587 B
JavaScript
const { makeRequest } = require('./momoModule');
makeRequest({
callbackHost: "<callbackHost>",
userApiKey: "<userApiKey>",
userId: "<userId>",
primaryKey: "<primaryKey>",
amount: "<amount>",
currency: "<currency>",
externalId: "<externalId>",
partyIdType: "<partyIdType..eg..MSISDN>",
partyId: "<partyId>",
payerMessage: "<payerMessage>",
payeeNote: "<payeeNote>"
})
.then(({ response, status }) => {
// console.log("Response:", response);
// console.log("Transaction Status:", status);
})
.catch(error => {
console.error("Error:", error);
});