Skip to main content
Callbacks are used in Link when a user performs one action that triggers another action.

Overview

When Argyle Link is initialized for a new user (in other words, userToken was not specified), a new user is created just before the user tries to connect their first payroll account. This is when the onUserCreated callback is invoked with an object containing a userId and a userToken. Whenever a user creates a new account on Link, the onAccountCreated callback is invoked with the accountId and userId parameters.
  • Store those IDs on your database and use them to retrieve the user’s employment data from the Argyle API.
  • Save the user ID on your database to be able to reference the user’s accounts and request their user tokens from the API.
The onAccountUpdated callback is invoked when a user updates their credentials for an existing account.

Callbacks reference