Categorygithub.com/adelowo/go-mono
repository
0.0.0-20241222123134-2264af51a20e
Repository: https://github.com/adelowo/go-mono.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Go-Mono

go-mono is a Go client library for accessing the Mono v2 API.

[!WARNING] This is not feature complete nor does it cover all available APIs. I am building to use for https://tewotewo.com and https://gympeek.com. So I will prioritize features needed over there. But feel free to open an issue or PR if you need support for a specific endpoint

Usage


 client, err := mono.New(mono.WithAPISecret("test_sk_ddd"))
 if err != nil {
  log.Fatal(err)
 }

 // or other methods as you use
 err = client.Account.Unlink(context.Background(), "id")
 if err != nil {
  log.Fatal(err)
 }

 client.DirectDebit.Pause(context.Background(), "mmmmmmm")

Using your own HTTP Client

Sometimes, you need to reuse an http client instead of letting the library create and manage one for you. Sometimes, this might also be because you want to trace the request amongst others.


httpClient := http.Client{
 Transport: otelhttp.NewTransport(http.DefaultTransport),
}

client, err := mono.New(
  mono.WithAPISecret("test_sk_ddd"),
  mono.WithHTTPClient(httpClient),)


Features

  • Transactions
    • List transactions
  • Authorisation
    • Exchange token
    • Reauthorise account
  • Inflow/Outflow
    • Credits
    • Debits
  • Direct Debit
    • Initiate a mandate with Authorisation link
    • Fetch mandate details
    • Debit an account
    • Balance enquiry on account
    • Cancel mandate
    • Pause mandate
    • Reinstate mandate
    • Fetch all mandates
    • Fetch banks
  • Customers
    • Fetch details of a customer
    • Update a customer
    • Delete a customer
  • Accounts
    • Details
    • Unlink account
    • Identity
    • Balance
    • Income
    • Income records
    • All accounts linked to business
    • Creditworthiness
  • Statement
    • Fetch statement
    • Poll statement
  • Investments
    • Assets
    • Earnings
  • Data enrichment
    • Transaction Categorisation
    • Statement insights