mtn_momo 1.0.0 copy "mtn_momo: ^1.0.0" to clipboard
mtn_momo: ^1.0.0 copied to clipboard

outdated

MTN MoMo SDK API client

mtn_momo #

Partner Gateway sandbox provisioning API document

Requirements #

Dart 2.0.0 or later OR Flutter 2.7.0 or later

Installation & Usage #

Github #

If this Dart package is published to Github, please include the following in pubspec.yaml

name: mtn_momo
version: 1.0.0
description: MTN MoMo SDK API client
dependencies:
  mtn_momo:
    git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
      version: 'any'

Local #

To use the package in your local drive, please include the following in pubspec.yaml

dependencies:
  mtn_momo:
    path: /path/to/mtn_momo

Tests #

TODO

Getting Started #

Please follow the installation procedure and then run the following:

import 'package:mtn_momo/api.dart';

var api_instance = new MTNMoMoAPI();
var xTargetEnvironment = xTargetEnvironment_example; // String | The identifier of the EWP system where the transaction shall be processed. This parameter is used to route the request to the EWP system that will initiate the transaction.
var authorization = authorization_example; // String | Authorization header used for Basic authentication and oauth. Format of the header parameter follows the standard for Basic and Bearer. Oauth uses Bearer authentication type where the credential is the received access token.

try {
    var result = api_instance.getV10AccountBalance(xTargetEnvironment, authorization);
    print(result);
} catch (e) {
    print("Exception when calling MTNMoMoAPI->getV10AccountBalance: $e\n");
}

Documentation for API Endpoints #

All URIs are relative to https://sandbox.momodeveloper.mtn.com

Class Method HTTP request Description
MTNMoMoAPI getV10AccountBalance GET /v1_0/account/balance /v1_0/account/balance - GET
MTNMoMoAPI getV10AccountholderAccountholderidtypeAccountholderidActive GET /v1_0/accountholder/{accountHolderIdType}/{accountHolderId}/active /v1_0/accountholder/{accountHolderIdType}/{accountHolderId}/active - GET
MTNMoMoAPI getV10Apiuser GET /v1_0/apiuser/{X-Reference-Id} /v1_0/apiuser/{X-Reference-Id} - GET
MTNMoMoAPI postV10Apiuser POST /v1_0/apiuser /apiuser - POST
MTNMoMoAPI postV10ApiuserApikey POST /v1_0/apiuser/{X-Reference-Id}/apikey /v1_0/apiuser/{X-Reference-Id}/apikey - POST
MTNMoMoAPI requesttopayPOST POST /v1_0/requesttopay /requesttopay - POST
MTNMoMoAPI requesttopayReferenceIdGET GET /v1_0/requesttopay/{referenceId} /requesttopay/{referenceId} - GET
MTNMoMoAPI tokenPOST POST /token/ /token - POST
MTNMoMoAPI transferPOST POST /v1_0/transfer /transfer - POST
MTNMoMoAPI transferReferenceIdGET GET /v1_0/transfer/{referenceId} /transfer/{referenceId} - GET

Documentation For Models #

Documentation For Authorization #

apiKeyHeader #

  • Type: API key
  • API key parameter name: Ocp-Apim-Subscription-Key
  • Location: HTTP header

apiKeyQuery #

  • Type: API key
  • API key parameter name: subscription-key
  • Location: URL query string

Author #

4
likes
20
pub points
0%
popularity

Publisher

unverified uploader

MTN MoMo SDK API client

Homepage

License

GPL-3.0 (LICENSE)

Dependencies

http

More

Packages that depend on mtn_momo