Sandbox Testing
Retrieve sample data and simulate errors in the Sandbox environment.
Connect sample users#
To begin testing with sample data, connect sample users using the login credentials below through either:
- Flows in Console (make sure Console's Sandbox mode toggle is enabled) after selecting a demo or custom Flow.
- Embedded Link, with the
sandbox
parameter set totrue
in your Link initialization.
Bob | Sarah | Joe | |
---|---|---|---|
test1@argyle.com | test2@argyle.com | test3@argyle.com | |
Username | test_1 | test_2 | test_3 |
Password | passgood | passgood | passgood |
Verification code | 8081 | 8082 | 8083 |
Phone number | (800) 900-0010 | (800) 900-0020 | (800) 900-0030 |
Driver's license # | D1230010 | D1230020 | D1230030 |
Sample users are deleted after 60 days.
Retrieve sample data#
Console
With the Sandbox mode toggle in Console enabled, navigate to the Connections section of Console and select an individual sample user to view sample data.
API
Authorize requests using your Sandbox API key and secret, which can be found or created in the Developers section of Console, and make requests using the Sandbox environment's https://api-sandbox.argyle.com/v2
base URL.
Simulate a data refresh#
To simulate new data being added after an account's data is refreshed:
- Send a POST request with an empty body to
https://api-sandbox.argyle.com/v2/accounts/{acc-id}/periodic-scan
- Replace the
{acc-id}
path variable with the account ID of an already-connected sample user.
If successful, the request returns an empty object and 1-5 new paystubs and gig events are added to the sample account.
Simulated data refreshes are often used for webhook testing.
Update sample data#
The same endpoint used for simulating data refreshes in Sandbox can also be used to update a user's identity information:
- Send a POST request to
https://api-sandbox.argyle.com/v2/accounts/{acc-id}/periodic-scan
- Replace the
{acc-id}
path variable with the account ID of an already-connected sample user. - In the request body, include a JSON object with the updated identity values you want to be overwritten in the format shown in the example below:
- Most identities fields can be overwritten with the exception of
id
,account
,picture_url
,employer
,created_at
,updated_at
, andmetadata
. - Only possible values for (enum) identity fields are accepted.
1{ 2 "data": { 3 "identities": { 4 "address": { 5 "city": "Sydney", 6 "line1": "P Sherman", 7 "line2": "42", 8 "state": "Wallaby Way", 9 "country": "Australia", 10 "postal_code": "0872" 11 }, 12 "first_name": "Finding", 13 "last_name": "Nemo", 14 "full_name": "Finding Nemo", 15 "birth_date": "2003-05-30", 16 "email": "[email protected]", 17 "phone_number": "+12127777777", 18 "employment_status": "terminated", 19 "employment_type": "part-time", 20 "job_title": "Explorer", 21 "ssn": "553-983-2311", 22 "marital_status": "Single", 23 "gender": "Female", 24 "original_hire_date": "2020-01-03", 25 "hire_date": "2021-04-13", 26 "termination_date": "2023-09-22", 27 "termination_reason": "Forgetfulness", 28 "base_pay": { 29 "amount": "92050", 30 "period": "annual", 31 "currency": "USD" 32 }, 33 "pay_cycle": "monthly", 34 "platform_ids": { 35 "employee_id": "OB238HDW5", 36 "position_id": "6ELL4O7PM", 37 "platform_user_id": "JLH7B9V6O6YGN9O7" 38 } 39 } 40 } 41}
- Most identities fields can be overwritten with the exception of
Updating identities information is often used to test or explore how your system reacts to identity-related events such as a user's employment_status
updating from active
to terminated
.
When a user's identities data changes, the identities.updated
webhook is sent.
Simulate errors in Console#
- Navigate to Flows when Console is in Sandbox mode.
- Select a demo Flow, and the option to "Simulate an error" will appear next to the sample user's test email.
- Choose an error, and "Click to copy" the special test password. Use this password when connecting a payroll account for the sample user to simulate the error.
Simulate errors via the API#
-
Send a POST request to
https://api-sandbox.argyle.com/v2/test-password/encode
, and include a JSON object in the request body specific to the error type:- Account connection errors occur immediately after submitting sample user login credentials.
- The
invalid_mfa
error can be tested by entering an incorrect code, andmfa_timeout
will occur after ten minutes. - For the
auth_required
error, switch to the Disconnection errors tab.
1{ 2 "failure": { 3 "fail_on": "connection", 4 "error": "<Name of the Error>" // Any account connection error. 5 } 6}
-
Once the POST request is sent, you will receive a
test_password
in the response:1// *Example value 2{ 3 "test_password": "eyJmYWlsdXJlIjogeyJmYWlsX29uIjogImNvbm5lY3Rpb24iLCAiZXJyb3IiOiAiYWNjb3VudF9kaXNhYmxlZCJ9fQ==" 4}
-
Use this
test_password
as the password login credential when connecting a sample user to trigger the error.