MX Integration

Aggregate held away financial account data in the US



Back to Integrations



MX enables applications to connect with users' bank, credit card, loan, and investment accounts to pull in account details such as balances and transactions.

Setup

To get started, you’ll first need to sign up with MX and get your client_id and client_secret. If you already have an MX account, you can go ahead and sign in to retrieve these values.

Implementation

Once you have MX credentials set up on the Integrations Admin, you can embed MX Connect into your app or web page. The MX Connect will manage user credential validation, multi-factor authentication, and error handling for each institution that MX supports to ensure that your end-user is able to pull data from the account that they’ve linked.

Below is a sample MX Connect link embed code.

 
<script src="https://atrium.mx.com/connect.js"></script> 
<script>  
     var mxConnect = new MXConnect({    
          id: 'addAccount',    
          url: '<link>',
          onLoad: function () {  // Connect widget successfully loaded
          console.log('On Load');    
     },
     onSuccess: function (memberGuid) {  // Member created successfully
          console.log('On Success');    
     }  
     }); 
     var addAccountClick = function () {
          mxConnect.load();  
     }; 
</script> ​ 
 

1) Create a user in MX for the client_id that was created in Nucleus. This will connect the Hydrogen user to the MX user. This process can also be automated through the Hydrogen Integration Admin settings if you wish to use MX for all clients that you sign up:

POST /integration/v1/user

Sample Request

 
{
    "nucleus_client_id": "<nucleus_client_id>",
    "product": "atom",
    "integration_type": "aggregation",
    "vendor_name": "mx"
}

2) You will need to retrieve the URL for the client and replace the url in the widget above with it. To replace this, you can use the following Hydrogen endpoint to get the latest URL:

GET /integration/v1/widget_link/{nucleus_client_id}?vendor_name=mx

Sample Response

 
{
    "widget_url": "https://int-widgets.moneydesktop.com/md/connect/6xjA9mcj32ps626s2flqlAz8nyZgfgmz5dlc0gfyhqqm6kt05f0lhc6wlynpy5m2knkk92pmsr2j30vyszA14gbppmzdcmbv7rsjrA0n4c3mfyptq6qr1kjlbc9f40nA6clgs04rcsdjj8dbl0h43zt7xw9b3rzml71c22xd0f4mzvqAcldAh49tsgfwqp97ctxqmzjvzk0rq51rmg0xmy8Al3ktysntstfq9h1zmzh39288lw910z3l2xr0vv093xcqj877b35gr9zp68w338r3hb5pAzjdqc3r0wcbcszfs60670yt0zcg1xzp60lrs9b0qq9cjc44A0607m3nzdmw3ll1bAr18mw9kf41/eyJ1aV9tZXNzYWdlX3ZlcnNpb24iOjEsInVpX21lc3NhZ2Vfd2Vidmlld191cmxfc2NoZW1lIjoiYXRyaXVtIn0%3D",
    "vendor_name": "mx"
}
 

3) In the response, use the widget_url and replace the url in the MX widget code above. Now, the code snippet is ready to launch the MX Connect applet.

4) Now we just have to create the aggregation account to store all the data in Nucleus from the response above.

POST /integration/v1/aggregation/account

  
{
     "nucleus_client_id": "<nucleus_client_id>",
     "product": "atom" 
}  

5) Once the account is stored, you can pull balances, transactions, and holdings for the account.

GET /integration/v1/aggregation/balance/{aggregation_account_id}

GET /integration/v1/aggregation/transaction/{aggregation_account_id}

GET /integration/v1/aggregation/holding/{aggregation_account_id}