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.
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:
index.htmlin a web browser. Argyle Link will open a modal window where you can select a data partner and connect work accounts.
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:
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.
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.
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_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.
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:
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.
You can test pay distribution updates in the Sandbox environment as well.
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
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.
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.
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.
percent_allocation is provided, the user will not be able to enter a percent-based allocation.
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.
amount_allocation is provided, the user will not be able to enter an amount-based allocation
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
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.
payDistributionItemsOnly is set to true, Link will show only companies and platforms that support direct deposit update functionality.