momofy-dotnet-sdk
1.0.0
dotnet add package momofy-dotnet-sdk --version 1.0.0
NuGet\Install-Package momofy-dotnet-sdk -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="momofy-dotnet-sdk" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add momofy-dotnet-sdk --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: momofy-dotnet-sdk, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install momofy-dotnet-sdk as a Cake Addin #addin nuget:?package=momofy-dotnet-sdk&version=1.0.0 // Install momofy-dotnet-sdk as a Cake Tool #tool nuget:?package=momofy-dotnet-sdk&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Momofy .NET SDK
Officially supported momofy package for .Net applications.
Some useful resources
Visit the Documentation
Goto the Dashboard
Installation
To install this package run
Environment Variables
To be able to perform transactions using this SDK you need to get your API Secret Key from your Momofy Dashboard.
eg. secret_test_01HPH70VG02DAYJ1N70NP4QWKV
Envronment Types
Example | Description | |
---|---|---|
Test |
secret_test_01HPH70VG02DAYJ1N70NP4QWKV |
Use test enviroment during project development |
Production |
secret_prod_01HPH70VG02DAYJ1N70NP4QWKV |
Use production enviroment for live application |
Usage
Initiate Transaction
Request payment from your customers
Request Response
options
Params | Example values | Description |
---|---|---|
amount |
20 or "30" |
Amount to be requested from customer |
channel |
mobile_money |
Only mobile money channel is currently being supported |
currency |
GHS |
The supported currency from the provider |
customer |
Customer Object |
The customer information |
provider |
MTN or VODAFONE |
Network Provider code ( get this from the docs ) |
reference_code |
unique uuidv4 number |
Reference code ( will be auto generated when not provided ) |
transaction_note |
Message for transaction |
Note to display to user when requesting for payment. |
Customer Object
Params | Required | Description |
---|---|---|
name |
Yes | Name of the customer |
phone_number |
Yes | Momo number of customer to be charged. |
email |
Yes | Email of the customer (if not available provide organisation email) |
Verify Transaction Status
Verify your transaction by providing the transaction ref ID.
Verification Response
Transaction Status Type
Status | Description |
---|---|
initiated |
Transaction has been initiated |
pending |
Transaction has been successfully sent to the provider |
success |
Transaction was process successfully |
failed |
Transaction has failed means (may be the user declined the payment request or something bad has happened ) |
Feedback
If you have any feedback, Feel free to open an issue
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 136 | 2/21/2024 |