Asynchronous Connections

If you wish to make a connection to a banking provider that doesn't do the initial sync for transactions and financial data before returning the result to you, you may request to make the connection asynchronously.

This can be achieved simply by adding an mh:sync claims value to the authorisation URL you generate for the banking connection.

{
  "id_token":{
    "mh:sync":{
      "essential":true,
      "value":{
        "enableAsync":true
      }
    }
  }
}

When the connection completes, the value of mh:sync will be a sync ID that you will be able to use to query for more information on the sync using the get connection sync end point

If you're using the Moneyhub NodeJS library (requires version 4.18.0), you can generate an asynchornous connection auth URL by making the following call:

const url = await moneyhub.getAuthorizeUrlForCreatedUser({
  userId,
  state,
  bankId,
  nonce,
  claims,
  enableAsync: true,
})