@spreeloop/mtn_momo

中文文档
1.0.6发布于 2026/11/02MITTypeScriptCommonJS

A mtn momo api integration package

原始使用文档
文档目录3 节
  1. Features
  2. Installation
  3. Base URL configuration

Welcome to @spreeloop/mtn_momo 👋

Version License: MIT

The MTN Mobile Money Node.js Integration Module is a powerful toolkit designed to simplify the integration of MTN MoMo payment capabilities into Node.js applications. This module provides developers with a convenient interface to interact with MTN MoMo APIs, enabling seamless payment processing and transaction management.

Features

  • Easy Integration: Simplifies the integration of MTN MoMo payment functionality into Node.js applications.
  • Flexible Configuration: Allows developers to customize payment configurations based on specific requirements.
  • Comprehensive Documentation: Provides comprehensive documentation and examples for easy integration and usage.
  • Supports Multiple Environments: Supports multiple target environments, including production and testing environments.

Installation

To install the MTN MoMo Node.js Integration Module, simply add it to your Node.js project using npm:

Base URL configuration

Set baseURL to the MTN MoMo API base URL for the selected targetEnvironment. The consumer chooses the host; the package uses that same configured host without inferring or switching it based on the environment. The package appends the API paths automatically.

import {
  MtnMomoPayment,
  TargetEnvironment,
  XTargetEnvironmentType,
} from "@spreeloop/mtn_momo";

const config = {
  targetEnvironment: TargetEnvironment.prod,
  baseURL: "https://proxy.momoapi.mtn.com",
  apiKey: "your_api_key",
  apiUserKey: "your_api_user_key",
  xTargetEnvironment: XTargetEnvironmentType.mtnCameroon,
  ocpApimSubscriptionKey: "your_subscription_key",
  logger: console,
};

const payment = MtnMomoPayment.createPayment(config);

版本与发布记录

@spreeloop/mtn_momo 共发布 6 个版本,首次发布于 2024/12/11;过去 12 个月发布了 1 个版本。

版本发布日期距今
1.0.6latest2026/11/021 天前
1.0.52024/12/251.9 年前
1.0.42024/12/191.9 年前
1.0.32024/12/191.9 年前
1.0.22024/12/111.9 年前
1.0.12024/12/111.9 年前

关于 @spreeloop/mtn_momo 的常见问题

@spreeloop/mtn_momo 是什么?

一个mtn momo api集成包

如何安装 @spreeloop/mtn_momo?

在项目目录运行 npm install @spreeloop/mtn_momo,或使用 pnpm add / yarn add / bun add。

@spreeloop/mtn_momo 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@spreeloop/mtn_momo 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@spreeloop/mtn_momo 可以商用吗?

@spreeloop/mtn_momo 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@spreeloop/mtn_momo 还在维护吗?

最新版本 1.0.6 发布于 2026/11/02(1 天前);至今共发布 6 个版本,其中过去 12 个月发布了 1 个;首次发布于 2024/12/11。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。