>  Switch To Link 5 and API v2 Documentation

Implementation

Integrating your paycheck-linked lending solution.

This guide provides a step-by-step process for paycheck-linked lending implementations, which combine Argyle's verification of income and employment and deposit switching capabilities.

Here we will cover the typical paycheck-linked lending flow:

  • The loan applicant connects their payroll accounts through Argyle Link.
  • Argyle retrieves their income and employment information, which is used to make a loan decision.
  • The loan applicant returns to Argyle Link and accepts a new loan-matching paycheck allocation.

After initial sign-up, access Argyle Console and navigate to Settings in the top nav bar. Upload your company name and logo from the Company details tab.

Argyle Link is the portal through which your applicants connect their payroll accounts.

  • Follow the steps below to embed Argyle Link in your website or application.
  • Alternatively, you can use Argyle Console to invite applicants via text or email. The invitation will include a URL that will connect the applicant to Argyle Link directly.

Visit our embedding Link guides for Web, iOS, Android, and React Native to see how to include optional configuration parameters such as callbacks and search limits.

Basic configurations for connecting payroll accounts:

1<!DOCTYPE html>
2<html>
3  <head>
4    <meta charset="utf-8" />
5  </head>
6
7  <body>
8    <script src="https://plugin.argyle.com/argyle.web.v3.js"></script>
9    <script type="text/javascript">
10      const argyle = Argyle.create({
11        linkKey: 'YOUR_LINK_KEY', // Found in Argyle Console
12        apiHost: 'https://api-sandbox.argyle.com/v1', // Sandbox testing environment
13        userToken: 'USER_TOKEN', // Used to authenticate users
14      });
15      argyle.open();
16    </script>
17  </body>
18</html>

Link Keys — Link keys connect your embedded instance of Argyle Link to your Argyle account. Your Sandbox and Production link keys can be found in the Link key section of Argyle Console. Make sure the type of link key in your configuration matches the environment.

Environment — Argyle Link can run in two types of environments: Sandbox mode (for testing) or Production mode (for connecting real payroll accounts).

  • Sandbox configurations use https://api-sandbox.argyle.com/v1
  • Production configurations use https://api.argyle.com/v1

User tokens — Argyle utilizes user tokens to authenticate users (your applicants).

Connect test accounts#

If you are testing an embedded instance of Argyle Link that uses the Sandbox environment, you can connect sample applicants using the test login credentials below. These credentials will also work if you are using Flows in Argyle Console for testing.

BobSarahJoe
Emailtest1@argyle.comtest2@argyle.comtest3@argyle.com
Usernametest_1test_2test_3
Passwordpassgoodpassgoodpassgood
Verification code808180828083
Phone number(800) 900-0010(800) 900-0020(800) 900-0030
Driver's license #D1230010D1230020D1230030

If a login field does not match one of the fields above, the closest field can be used. For example, a username value can be used for a "UserID" login field.

The sample data returned depends on what type of payroll account (gig or non-gig) was connected in the Sandbox environment.

View data retrieval status#

Argyle begins data retrieval immediately when a payroll account is successfully connected. The time it takes for all data to finish syncing depends on the length of employment:

When viewing data in Console (by clicking on an individual user within the Connections page), spinning status circles will indicate if data is still syncing for a new payroll connection.

You can also monitor the progress of data retrieval by using the accounts API endpoint and checking the status field of the availability object. We recommend including the optional onAccountConnected callback in your Link configuration to make automating this process easier.

Retrieve payroll data#

If you are using Console to retrieve payroll data, navigate to the Connections page and click on an individual user to view data from their connected payroll accounts.

If you are using the API to retrieve payroll data, visit our API Reference for more information.

Configure the deposit switch#

At this point in the process, the applicant will have connected their payroll accounts and been approved for a loan based on their income data.

You would now re-initialize Argyle Link for the same applicant and include a deposit switch configuration in your Link initialization code if you are embedding Argyle Link, or send the applicant another invite through Argyle Console after setting up deposit switching for invites.

To set up your deposit switch configuration if you are embedding Argyle Link, follow the steps in the section below.

Embedded configurations#

To enable the deposit switching flow if you are embedding Argyle Link, you will need to provide a deposit switching configuration in your Argyle Link initialization code.

This deposit switching configuration contains the bank account details where you want the user's paycheck to be sent, and the allocation settings that determine how much of that paycheck you want to receive.

Below is an example configuration that transfers an exact amount ($177) of the applicant's paycheck to the provided bank account. A full list of example configurations can be found in our dedicated Deposit Switching Guide.

1// Receive $177 of the paycheck
2
3{
4  "bank_account": {
5    "bank_name": "YellowHorizon",
6    "routing_number": "084101234",
7    "account_number": "9483746361234",
8    "account_type": "checking"
9  },
10  "amount_allocation": {
11    "value": "177",
12    "min_value": "177",
13    "max_value": "177"
14  }
15}

In order to protect sensitive bank account details, this deposit switch configuration needs to be encrypted before including it in your Argyle Link initialization.

To encrypt the configuration, make a POST request to our API encryption endpoint. Include the unencrypted configuration above in the request body.

You should received an encrypted configuration in the response that looks similar to:

1{
2  "encrypted_config": "CiQAB/5leR8apwI6icBQ6w7TsNOYoYNpAUBP4/fpP48Pij6Z+OYSvQIAfV+QlVQKWPoQPVeMf1wqovnIZprUQrmn/3TTAw3LH3MXphOd/610Hy36Tgv0oig9Q/xMxLMQWGThV9TaXBWw0ucowHjETRaQVynM78W/IQ5eVn+Xn7OqL5Imz36XbzNd+O1Xtor+ZE5hhXzH+CR0uo1bq5dsxCks9p8z5PLZIXgZCJr4v9ximsUAbT1WFiclPSai4MjL3zkMto1Ss0teSYUBKdgBWn/mgAGsV/As6tRVKT3Hyhhy7LWGyvySmTxe8ALAVv21nx+R76i+ddVoxrmgVn0slTrVBz5P4w/9pSD/6fH5HnKQc7g44qJtnORdqujbcdSaK1H5RgqTLld0DUX+ujrxHZE+FP1mo0Ziq80H5HlGgjsjA+JWEif/gItT+Ada8ckS2/IOMJPE8vbK2jQYlCj+mlj2uQF5yg=="
3}

This encrypted configuration will be used in your Link initialization for the returning applicant.

Initialize a deposit switch#

If are sending invitations through Argyle Console, the deposit switching flow will automatically be enabled in Argyle Link when you resend an invitation to the applicant if you completed the deposit switching setup process.

If you are embedding Argyle Link:

  1. Create a new user token for the returning applicant

  2. Replace the previous user token in your original Link initialization code with the new user token

  3. Add these two deposit switching parameters to your Link initialization: payDistributionUpdateFlow and payDistributionConfig. See the example Link initializations below for examples of how to add them to each platform.

    • Pay Distribution Update Flow — Enables the deposit switching flow in Argyle Link.
    • Pay Distribution Config — Where you pass your encrypted deposit switching configuration. For our $177 paycheck allocation example, you would include the following:
    1// $177 of paycheck example
    2
    3payDistributionConfig: "CiQAB/5leR8apwI6icBQ6w7TsNOYoYNpAUBP4/fpP48Pij6Z+OYSvQIAfV+QlVQKWPoQPVeMf1wqovnIZprUQrmn/3TTAw3LH3MXphOd/610Hy36Tgv0oig9Q/xMxLMQWGThV9TaXBWw0ucowHjETRaQVynM78W/IQ5eVn+Xn7OqL5Imz36XbzNd+O1Xtor+ZE5hhXzH+CR0uo1bq5dsxCks9p8z5PLZIXgZCJr4v9ximsUAbT1WFiclPSai4MjL3zkMto1Ss0teSYUBKdgBWn/mgAGsV/As6tRVKT3Hyhhy7LWGyvySmTxe8ALAVv21nx+R76i+ddVoxrmgVn0slTrVBz5P4w/9pSD/6fH5HnKQc7g44qJtnORdqujbcdSaK1H5RgqTLld0DUX+ujrxHZE+FP1mo0Ziq80H5HlGgjsjA+JWEif/gItT+Ada8ckS2/IOMJPE8vbK2jQYlCj+mlj2uQF5yg=="
  4. (Optional) You can also add a parameter to your Link initialization that directly connects the applicant to one of their connected payroll accounts. This can be useful to ensure the connected payroll account supports your specific deposit switching configuration. Visit our Deep Linking Guide for more information on initializing Argyle Link with direct connections.

Example Argyle Link initializations for deposit switching:

1<!DOCTYPE html>
2<html>
3  <head>
4    <meta charset="utf-8" />
5  </head>
6
7  <body>
8    <script src="https://plugin.argyle.com/argyle.web.v3.js"></script>
9    <script type="text/javascript">
10      const argyle = Argyle.create({
11        linkKey: 'YOUR_LINK_KEY', // Found in Argyle Console
12        apiHost: 'https://api-sandbox.argyle.com/v1', // Sandbox testing environment
13        userToken: 'USER_TOKEN', // Used to authenticate users
14        payDistributionUpdateFlow: true, // Enables deposit switching flow
15        payDistributionConfig: 'ENCRYPTED_CONFIGURATION', // Your encrypted deposit switching configuration
16      });
17      argyle.open();
18    </script>
19  </body>
20</html>

The deposit switching update process typically takes fifteen to thirty seconds on most payroll systems, and up to two minutes on the slowest payroll systems.

Set up notifications#

Argyle uses webhooks to notify you when different events occur, such as a new payroll account connection or if a deposit switch is successful.

You can subscribe to webooks from the webhooks page in Console, or using the API.

We recommend subscribing to the following webhooks that are relevant to paycheck-linked lending to get started:

  • accounts.connected notifies you when a payroll account connection attempt is successful.
  • accounts.failed lets you know if a connection attempt failed, and provides error details for the event.
  • payouts.partially_synced notifies you when pay data is available for a specified number of days_synced — one month, one year, or two years, for example.
  • users.fully_synced notifies you when data retrieval has fully completed for all payroll accounts successfully connected by the applicant.
  • accounts.pay_distribution_updated notifies you when a deposit switch successfully completes.
  • accounts.pay_distribution_failed notifies you when a deposit switch attempt is unsuccessful.

Visit our Webhooks Reference for a full list of available webhooks.

Going live#

When you are ready to transition from Sandbox testing to Production mode, make the following adjustments:

  • If you are using Argyle Console's invite feature, simply flip the toggle switch in the upper left to enter Production mode.
  • If you are embedding Argyle Link:
    1. Adjust your Argyle Link configuration to use https://api.argyle.com/v1 instead of https://api-sandbox.argyle.com/v1
    2. Swap the Sandbox link key to the Production link key in your Argyle Link initialization code
    3. Make API requests to https://api.argyle.com/v1 instead of https://api-sandbox.argyle.com/v1
Updating Argyle status...
© 2024 Argyle Systems Inc.argyle.com