Skip to content

eskye/mono-dotnet

Repository files navigation

Mono-dotnet

Mono-dotnet is a .net sdk wrapper for Mono . For complete information about the API, head to the docs.

Compatibility

SDK is compatible with both .NET Core and .NET Standard project.

Getting Started

  • Register on Mono website and get your Authorization key.
  • Setup your mono connect with your mono public key.

Installation

Check the Mono.Net.Sdk on nuget: https://www.nuget.org/packages/Mono.Net.Sdk


Install via the nuget package manager console:

PM> Install-Package Mono.Net.Sdk


Install via the dotnet cli:

> dotnet add package Mono.Net.Sdk

Usage

The Mono Sdk needs to be configured with your account's secretKey, which is available in the Mono Dashboard.

//Instantiate the MonoClient Sdk using your secret key
 var monoClient = new MonoClient("test_sk_xxxxxxxxxx");

//Get your account information, pass your accountId
 var response = await monoClient.Accounts.GetAccountInformation(accountId: "848848je94943308899");

Features

Implementation

Methods

Once an instance of the client has been created you use the following methods:

Get Account Id from token

This resource returns the account id (that identifies the authenticated account) after successful enrolment on the Mono Connect Widget.

await monoClient.Auth.GetAccountId(new AuthAccountRequest
                {
                    Code = "code_xxxxxxxxxxxx"
                });

Get Account Information

This resource returns the account details with the financial institution.

 await monoClient.Accounts.GetInformation(string accountId);

Get Wallet Balance

This resource allows you to check the available balance in your Mono wallet

 await monoClient.User.GetWalletBalance();

Get Account Statement in JSON

This resource returns the bank statement of the connected financial account in JSON.
You can query 1-12 months bank statement in one single call.

await monoClient.Accounts.GetStatementsInJson(string accountId); 

Get Account Statement in PDF

This resource returns the bank statement of the connected financial account in PDF.
You can query 1-12 months bank statement in one single call.

await monoClient.Accounts.GetStatementsPdf(string accountId); 

Poll Account Statement in PDF

With this resource, you set the output as PDF, and you can use this endpoint to poll the status

await monoClient.Accounts.GetPollPdfAccountStatementStatus(string accountId, string jobId); 

Get Account Transactions

This resource returns the known transactions on the account.

await monoClient.Accounts.GetTransactions(string accountId, string type="credit"); 

For more options you can filter with the following:

  • Start: start period of the transactions eg. 01-10-2020
  • End: end period of the transactions eg. 07-10-2020
  • Narration: narration filters all transactions by narration e.g Uber transactions
  • Limit: limit the number of transactions returned per API call
  • Paginate: true or false (If you want to receive the data all at once or you want it paginated)

Get Income Information

This resource will return income information on the account.

 await monoClient.Accounts.GetIncome(string accountId);

Get Account Identity

This resource returns a high level overview of an account identity data.

await monoClient.Accounts.GetUserIdentity(string accountId);

Get Financial Institutions

This resource returns the available institutions on Mono

await monoClient.Misc.GetInstitutions();

Unlink Account

This resource provides your customers with the option to unlink their financial account(s)

await monoClient.Misc.UnlinkAccount(string accountId)

Business Lookup

This resource returns the information of a particular business/company by searching with the business/company name

await monoClient.Misc.BusinessLookUp(string companyName);

Business Shareholder Details

This resource returns the shareholder details of a particular business/company using the ID returned from the business lookup method.

await monoClient.Misc.ShareholderDetails(string businessId);

Synchronise Data

This resource attempts to Sync data manually.

 await monoClient.Auth.SyncDataManually(string accountId);
 

Get Re-auth Code.

This resource returns a Re-auth code which is a mono generated code for the account you want to re-authenticate,

await monoClient.Auth.ReAuthorizeCode(string accountId);

License

The MIT License (MIT). Please see License File for more information.

Contribution

If you would like to contribute to the Mono .NET SDK, Please feel free to raise a pull request.

About

.NET library for Mono's API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages