Officially supported momofy package for .Net applications.
Some useful resources
Visit the Documentation
Goto the Dashboard
To install this package run
dotnet add package momofy-dotnet-sdk --version 1.0.0
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
Example | Description | |
---|---|---|
Test |
secret_test_01HPH70VG02DAYJ1N70NP4QWKV |
Use test enviroment during project development |
Production |
secret_prod_01HPH70VG02DAYJ1N70NP4QWKV |
Use production enviroment for live application |
MomofyClient momofyClient = new MomofyClient("your_secret_key");
Request payment from your customers
momofyClient.RequestPayment(PaymentRequest object)
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. |
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 your transaction by providing the transaction ref ID.
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 ) |
If you have any feedback, Feel free to open an issue