Updating an Item

In this guide, we'll show you how to update an existing Item using our Connect widget.

Normally, Items are updated automatically by Pluggy on a daily basis.

But, there are some scenarios where this is not possible, due to limitations related to extra authentication requirements from the Instutition (such as a MFA requirement), or due to the Item entering into a certain invalid state that requires manual input from the user.

You would need to do this in the following scenarios:

  • Items that could not succeed due a problem with their credentials (Item status: INVALID_CREDENTIALS).
  • Items that are not able to auto-sync by Pluggy on our daily synchronization process, due to the connection needing an extra input from the user, such as a MFA parameter.

To open Pluggy Connect in this update mode, you need to:

  1. Create a new Connect Token, specifying the itemId parameter of the corresponding Item connection we want to refresh. This detail is necessary to let us properly validate that you are authorized to access and udpate this specific Item.

  2. Pass it to Connect, both the recently created connectToken, and the corresponding Item id through the updateItem property.

Case: INVALID_CREDENTIALS

This happens when:

  • The credentials provided by the user have not been correct, for example due to an incorrect input.
  • The credentials were correct, but when we tried to auto-sync the Item by reusing the last valid credentials, we found an invalid login error.

For any of these situations, the user will need to use Pluggy Connect to update this Item and provide new credentials.

After this, if the login step succeeded, any further update of this Item will just reuse the newly provided credentials and our auto-sync process will resume working again.

Case: Item not auto-syncheable

This is the case for institutions that require an extra MFA login step.

In this scenario, the only option for the Item to be updated, is to have the User open Pluggy Connect configured for the corresponding Item, and have him/her solve the required MFA challenge as needed.

Some examples are:

  • XP
  • Bradesco
  • Easynvest
  • Rico Investimentos

You can find in the complete list of Connectors which ones require an MFA.

📘

Note

There are some institutions that only require an initial verification or device authorization as a MFA only for the first time. After this, no more manual input is needed from the User, so we'll be able to auto-sync these Items as well.