Sandbox Environment

Learn how to test your integration in the Sandbox environment.

Overview

Getting up and running with the Argyle API is as simple as the following process. Additional customization is available once you have completed your initial integration, but we have left that out of this guide intentionally for simplicity's sake.

For a comprehensive list of all the things you can do with Argyle's API please refer to the API reference. To learn more about the data that you can access, please read the data structure guide.

Step 1: Integrate Argyle Link

All you need to do to embed Argyle Link into your web application is include argyle.web.js on your webpage and initialize it by providing a list of configuration options.

You can then invoke the Argyle Link UI element at any time within your application.

Here's an example of a fully functional web integration:

To run the example on your own machine:

  1. Copy-paste the snippet into an empty index.html file.
  2. Replace the "plugin_key" placeholder with your own plugin key, which you can retrieve by logging into the Argyle Console.
  3. Open the index.html in a web browser. Argyle Link will open a modal window where you can select a data partner and connect work accounts.

You can also integrate Argyle Link for AndroidiOS, or React Native.

Step 2: Connect a work account

Now that you've set up Argyle Link and configured it with your pluginKey, you will be able to open our UI element anywhere in your application.

Your users will navigate the Argyle Link UI to connect their work accounts to Argyle and grant you access to their work history.

Within the Sandbox environment, we provide two slightly different data sets:

  • Rideshare/Delivery — if you select a gig company like Uber or Doordash, the data will have more activity (duration, distance, etc.) information.
  • General — if you select any other company or payroll platform, the data will reflect traditional employment records.

You might have noticed the apiHost configuration parameter in the example code pointing to https://api-sandbox.argyle.io/v1. This ensures that the plugin starts in a sandbox environment where you can use the sandbox credentials below to test Argyle Link.

When running in the sandbox environment, you can only connect work accounts with the provided sandbox credential, which work for any Link item.

BobSarahJoe
Email[email protected][email protected][email protected]
Usernametest1test2test3
Passwordpassgoodpassgoodpassgood
SMS code808180828083
Phone number(800) 900-0001(800) 900-0002(800) 900-0003
Driver's licenseD1230001D1230002D1230003

Make sure that you select the appropriate credentials item. For example, Walmart requires username and password, while Uber requires email and password.

Before proceeding to the next step, make sure to click on one of the Link items and use one of the sandbox credentials to connect it.

Step 3: Retrieve employment data

After your users connect their work accounts, your application can start using Argyle's API to retrieve information in their work account.

The Argyle API uses basic access authentication: you have to specify your credentials with every request you make to the API.

Here's an example API call using curl.

Before running the curl command make sure to replace your_client_id and your_client_secret with your own credentials, which you can access in the Argyle Console.

The API call will return a JSON object that contains a list of activities (e.g., Uber trips, Instacart deliveries, etc.) performed by your customers.

This specific API call will return activities for all of your customers who have connected their work accounts through Argyle Link.

To learn more about how to filter activities for a specific user, retrieve other data such as profile, or a list of your customer's vehicles, please refer to the API reference documentation and the guide for Argyle Link.

Step 4: Trigger a periodic scan

In the production environment, new data for connected accounts is constantly generated and delivered to you (e.g. new payouts, activities) during periodic data scans. For testing purposes, you can trigger a periodic scan yourself to get new data for an already connected account. Please use the following endpoint:

https://api-sandbox.argyle.io/v1/accounts/<acc-id>/periodic-scan

It accepts POST requests with an empty body.

<acc-id> must be a Sandbox accounts.id, otherwise an error will be returned:

This endpoint can be used for testing webhook integration and new data arrival.

Periodic scan data

A periodic scan for sandbox accounts will return 1-5 new payouts and activities. A periodic scan can be triggered as many times as you need for testing.

Pay distribution testing

You can test pay distribution updates in the Sandbox environment as well.

Create a pay distribution configuration

Argyle Link will initiate a pay distribution change process if a pay distribution configuration is provided. Pay distribution configuration describes the desired outcome of that change.

Here are some examples:

Allocations in the pay distribution configuration are recommendations. Users can modify the amounts or percentage of their pay to go to your account.

If you want to restrict the percentage or amount your user can allocate, define the min_value and max_value parameters as shown in this next example:

If the config contains only a percent allocation, Argyle restricts the options to percent only for the user. In the same way, if only the amount allocation is configured, the user will not be able to transfer you a percentage of their pay.

Pay distribution configuration parameters

bank_account.bank_name
string
required

Bank name that will be displayed alongside an obfuscated account number in Link.

bank_account.routing_number
string
required

9-digit code that is based on the bank location where the user's account was opened.

bank_account.account_number
string
required

8 to 17-digit code that identifies the user as the account holder in the bank. The allocation will be sent to this account.

bank_account.account_type
string
required

Type of the bank account.

Possible values: checking, savings.

default_allocation_type
string
optional

The allocation type that will be presented to the user by default. Not all employment accounts support both formats. If you select a default that is not supported by the user's employment account, the user will still be able to enter an allocation using the supported format as long as a default value for that format is provided.

Possible values: percent, amount.

percent_allocation
object
optional

An object representing a percentage to be transferred into the bank account.

At least one of percent_allocation or amount_allocation is required for the configuration.

percent_allocation.value
string integer
required

The default percent value that will be displayed to the user during the pay distribution update process.

percent_allocation.value is required if percent_allocation is used in the configuration.

If no percent_allocation is provided, the user will not be able to enter a percent-based allocation.

percent_allocation.min_value
string integer
optional

The minimum percent value that the user will be able to deviate from your recommended or default value. Set this to the same as percent_allocation.value if you do not want the user to choose a lower amount than your default value.

percent_allocation.max_value
string integer
optional

The maximum percent value that the user will be able to deviate from your recommended or default value. Set this to the same as percent_allocation.value if you do not want the user to choose a higher amount than your default value.

amount_allocation
object
optional

An object representing a dollar amount to be transferred into the bank account.

At least one of percent_allocation or amount_allocation is required for the configuration.

amount_allocation.value
string integer
required

The default amount value that will be displayed to the user during the pay distribution update process.

amount_allocation.value is required if amount_allocation is used in the configuration.

If no amount_allocation is provided, the user will not be able to enter an amount-based allocation

amount_allocation.min_value
string integer
optional

The minimum amount value that the user will be able to deviate from your recommended or default value. Set this to the same as amount_allocation.value if you do not want the user to choose a lower amount than your default value.

amount_allocation.max_value
string integer
optional

The maximum amount value that the user will be able to deviate from your recommended or default value. Set this to the same as amount_allocation.value if you do not want the user to choose a higher amount than your default value.

allow_add_allocation
boolean
optional

Setting allow_add_allocation to false, will remove the "Add bank account" button in the Pay distribution screen of Argyle Link.

Default value is true.

enable_suggestions
boolean
optional

If set to true, the user will be shown a suggested pay allocations redistribution (given there are more than two pay allocations in the account) and will only need to click the "Confirm" button. If set to false, the user will have to manually enter how the pay allocations should be distributed.

Default value is true.

allow_editing
boolean
optional

If set to true, users will see the Edit button in the pay allocations screen and will be able to change the allocations. If set to false, users will not see the Edit button and will not be able to make any changes.

Default value is true.

Integrate Argyle Link

To start the pay distribution update process in Link you must initialize it with the payDistributionConfig parameter set to an encrypted version of your pay distribution configuration.

The encryption is necessary to ensure your bank account details are never exposed on the front-end. Your full routing and account numbers always appear encrypted on the end user's device.

To encrypt your pay distribution config make a POST request into pay-distribution-config/encrypt with your pay distribution config in the payload.

You will get the following response that contains the encrypted version of your config:

Initializing Link with the payDistributionConfig parameter with the encrypted pay distribution configuration value will set up Link to run the pay distribution update process.

If the payDistributionItemsOnly is set to true, Link will show only companies and platforms that support direct deposit update functionality.