New Integration Flow

We released a new way to integrate our Movements product. Before you needed to setup a webhook that receives the information about your user connection async. Now you can get your user information right after the connection is succeeded!

๐Ÿ“˜

Note

  • To enable this new flow for your organization, contact support.
  • You can try this new integration using the same sandbox credentials

The connection flow begins when your user wants to connect their bank account to your app:

1103

So, putting into words:

  1. You need to create a Link Intent resource with the create endpoint. This object represents the connection intent of the user and receives all configurations needed to open the Widget in your frontend.
  2. The Link Intent resource you just created has a field named widget_token. You need to open the Widget in your frontend using this token:
<script>
  window.onload = () => {
    const widget = Fintoc.create({
      publicKey: '<FINTOC_PUBLIC_KEY>',
      widgetToken: 'li_XXXXXXXX_sec_YYYYYYYY',
    });
  };
</script>
  1. Once the connection is succeeded, you will receive the Link Intent object as a parameter in your onSuccess callback. This object now will have the exchange_token. This is a temporary key that allows you to retrieve the Link information, including the link_token, so then you can access all information provided by your user:
<script>
  window.onload(() => {
    const widget = Fintoc.create({
      publicKey: '<FINTOC_PUBLIC_KEY>',
      widgetToken: 'li_XXXXXXXX_sec_YYYYYYYY',
      onSuccess: (linkIntent) => {
        const exchangeToken = linkIntent.exchangeToken;
        sendExchangeTokenToBackend(exchangeToken);
        processSucceededConnection();
      },
    });
  });
</script>
  1. From your backend, use the the exchangeToken and your secret key to get the Link information using the exchange endpoint.

And thats it!