A user connects his financial bank account to your business through our Mono connect widget. Immediately this connection is successful, a temporary authorisation token is sent on the frontend which lasts for only 10minutes, which you can then send to the backend to exchange for a permanent Account ID.
On account connected
Please note that immediately after a user logs in successfully, these events "mono.events.account_connected" and "mono.events.account_updated" gets sent with a payload which contains a unique Account ID that stands as an identifier to this account.
Once the Account ID has been retrieved from the Exchange Token endpoint, Mono immediately tries to fetch all recent account information, transactions, identity, etc which takes roughly about 0.5 seconds to 5 minutes maximum, which is very dependent on the uptime of the bank's availability.
The event "mono.events.account_updated", with the meta.data_status as AVAILABLE indicates that data is now readily available on all our endpoints.
Once this event is received, it is then advisable to call any of our endpoints at will.
On account updated and data availability
At the point of receiving the mono.events.account_updated event, you can proceed to call your desired endpoints immediately.
Alternatively, you can have a flag (e.g mono.data_available) set in your db which is set to false by default, and then change this field to True once this event has been received.
So once a user logs back in some minute after, these endpoints can then be called as long as mono.data_available is set to true.
When Data sync gets called manually and the call is successful, "mono.events.account_updated" gets sent. If this call is not successful, and re-authorisation is required, this event "mono.events.reauthorisation_required" gets sent alongside a payload containing the Account ID.
Once the connected has re-authorised his account successfully, "mono.events.account_reauthorized" event gets sent, with a payload containing the Account ID.
Updated 5 months ago