mtnmomo-ts
v0.2.0
Published
Unofficial MTN mobile money NodeJS SDK
Downloads
33
Readme
Unofficial MTN mobile money javascript / typescript SDK library
Introduction
This project is an effort to provide simple nodejs SDK for the MTN mobile money platform written entirely in Typescript.
Requirements
- Node.js 18.x or higher
Getting Started
Install the package using any of the following methods.
npm install mtnmomo-ts
or
pnpm add mtnmomo-ts
or
yarn add mtnmomo-ts
Using the client
- Import the client into your project
import { MomoClient } from 'mtnmomo-ts';
- Instantiate an instance of the client passing in your
apiKey
,Ocp-Apim-Subscription-Key
,X-Target-Environment
,apiXReferenceId (X-Reference-Id)
const momoClient = new MomoClient({
apiKey: 'XXXX',
OcpApimSubscriptionKey: 'XXXXXXX',
apiXReferenceId: 'XXXX',
xTargetEnvironment: 'sandbox' | 'production',
});