Mono's robust APIs give developers/businesses superpowers to access financial accounts across Africa. To fully engage these suites of APIs, an Account ID is required for interactions.
To get started, you will need to implement the Mono connect widget, in which your user will fill in their bank credentials to authenticate with their desired bank.
Once authenticated, you'll receive an authorisation code which you will then use to exchange for the account ID that will be used to consume Mono's API endpoints. E.g. the Bank statement endpoint.
With the account ID received, you can save this to your database for future API interactions.
Let me show you how simple it is
Mono connect widget has a couple of SDK's where the widget can be initiated. For this context, we would be implementing a JS/HTML Mono connect widget sample.
Firstly, insert the below script in your head tag.
Next, you can have this button inserted anywhere in your body to initiate widget.
Now take a look at the code below:
Ensure you pass in your public key to your key field. If you do not have any, quickly take a look at this documentation to get one and proceed.
With this fully setup, your user will authenticate successfully and a response code will be passed to the onSuccess callback method.
At this point, you will have to send this code to your backend and retrieve the Account ID with Mono's Auth. Endpoint.
The below snippet is a basic implementation of retrieving the account id with Mono's auth endpoint.
Once retrieved, you can then go ahead and persists this account ID to database. Full code to a sample widget can be found in this repository.
Check out our documentation at https://docs.mono.co for access to more APIs.