Advanced testing

Follow these tutorials to learn about advanced testing scenarios on the sandbox.

On this page, learn how to:

Test different data sets

When you connect sample accounts, you can test two different sets of employment data: rideshare/delivery and general data. These represent the different types of users that may use your application.

Prerequisites

Before testing different data sets, you must:

Add user data

Within the sandbox environment, there are 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.

Select different Link item types to experiment with both data sets. Connect a gig link item to test with a gig data set. Connect a non-gig income source to test with a payroll/employer data set.

Connect a work accountConnect a work account

Test deposit switching

Direct deposit switching allows users to update their direct deposit information and include your bank account in their pay distribution. You can perform Deposit Switch with cards as well. Follow this tutorial to learn how you can test deposit switching and pay distribution updates in the sandbox environment.

Prerequisites

Before testing deposit switching, you must:

Create a pay distribution configuration

Argyle Link initiates a pay distribution update process if a pay distribution configuration is provided. The Pay distribution configuration describes the desired outcome of that update.

See these examples to understand how to set up your configuration:

// Argyle Link will request 20% of user's pay
// to be transferred to the account specified.
{
    "bank_account": {
        "bank_name": "New Bank",
        "routing_number": "084101234",
        "account_number": "9483746361234",
        "account_type": "checking"
    },
    "percent_allocation": {
        "value": "20"
    }
}
// Argyle Link will request 200 of user's pay
// to be transferred to the account specified.
{
    "bank_account": {
        "bank_name": "New Bank",
        "routing_number": "084101234",
        "account_number": "9483746361234",
        "account_type": "checking"
 },
    "amount_allocation": {
            "value": "200"
    }
}
{
    "card": {
        "card_number": "4253177385403456",
        "cardholder_title": "Mr",
        "cardholder_first_name": "John",
        "cardholder_last_name": "Doe",
        "card_name": "Viza",
        "expiration_year": 2030,
        "expiration_month": 10,
        "card_cvc_cvv": "900",
        "address_line1": "759 Victoria Plaza",
        "address_line2": "Unit 12",
        "city": "Los Angeles",
        "state": "CA",
        "postal_code": "90210",
        "country": "US"
    }
}

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:

// Argyle Link will default to the amount view, but it will
// let the user chose if they want to transfer 20 percent or 200 dollars.
// Percent value will be 20 by default, 
// but the user will be able to change it with a value 
// in the range from 10 to 30.
// Amount value will be fixed to 200.
{
    "bank_account": {
        "bank_name": "New Bank",
        "routing_number": "084101234",
        "account_number": "9483746361234",
        "account_type": "checking"
 },
    "default_allocation_type": "amount",
    "percent_allocation": {
            "value": "20",
            "min_value": "10",
            "max_value": "30"
    },
    "amount_allocation": {
            "value": "200",
            "min_value": "200",
            "max_value": "200"
    }
}

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.

Allocation parametersAllocation parameters

You can also configure pay distribution to allow users to add cards. Use feature.pay_distribution_card_update to learn which Link items support cards.

Refer to Direct deposit switching for more example configurations and specific use cases.

Pay distribution configuration parameters

For detailed descriptions of each pay distribution configuration parameter, refer to the Pay Distribution configs in the API Reference.

For visual examples of all customizable UI elements on the Pay Distribution screen in Link, refer to the Link customization guide.

Initialize Link with pay distribution config

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

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:

POST /v1/pay-distribution-configs/encrypt
{
 "bank_account": {
 "bank_name": "New Bank",
 "account_type": "checking",
 "routing_number": "123456789",
 "account_number": "1234567890"
 },
 "percent_allocation": {
            "value": "60"
    }
}

You receive a response like this that contains the encrypted version of your config:

{
    "encrypted_config": "CiQAB/5leTZndFpuHjsJx1SMoI2PnGDpaTPib/ApXLhVNHVuVukS8wEAfV+QlRWuG52YXKQSdy0hKg1Y768QUtOyI5CRMl7LRWn6axC0NZ3W3qxNoSgS3cXMikKibn6y40hZMMvUmUHriUXbNvtMUWT+6BrB6ATgH69Ng0CoS36tsDtQbitkHK3Iv6v8GQ7gRda8djQ6Uc5DfoTR8vF+brwhV+LvBIORoueVXQAp7GSzlYUicfeqnOXdyKjkF4QibzWrkFyw8b2cuUvvbwxyJe2IVSkZVuyATa06XDkxSbu9+cWPj6sV1iZfNGPiz/GjpMg+cVzkhqMHZFAqj6EmwgCse2DelFQ8HHkNoB9dI63lTa1NJY11B80K2B8="
}

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

Example

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
  </head>
  <body>
    <script src="https://plugin.argyle.com/argyle.web.v3.js"></script>
    <script type="text/javascript">
      const argyle = Argyle.create({
        linkKey: 'YOUR_LINK_KEY',
        apiHost: 'https://api-sandbox.argyle.com/v1',
        payDistributionItemsOnly: true,
        payDistributionConfig: "CiQAB/5leTZndFpuHjsJx1SMoI2PnGDpaTPib/ApXLhVNHVuVukS8wEAfV+QlRWuG52YXKQSdy0hKg1Y768QUtOyI5CRMl7LRWn6axC0NZ3W3qxNoSgS3cXMikKibn6y40hZMMvUmUHriUXbNvtMUWT+6BrB6ATgH69Ng0CoS36tsDtQbitkHK3Iv6v8GQ7gRda8djQ6Uc5DfoTR8vF+brwhV+LvBIORoueVXQAp7GSzlYUicfeqnOXdyKjkF4QibzWrkFyw8b2cuUvvbwxyJe2IVSkZVuyATa06XDkxSbu9+cWPj6sV1iZfNGPiz/GjpMg+cVzkhqMHZFAqj6EmwgCse2DelFQ8HHkNoB9dI63lTa1NJY11B80K2B8="
      })
      argyle.open()
    </script>
  </body>
</html>
let PD_CONFIG = "CiQAB/5leTZndFpuHjsJx1SMoI2PnGDpaTPib/ApXLhVNHVuVukS8wEAfV+QlRWuG52YXKQSdy0hKg1Y768QUtOyI5CRMl7LRWn6axC0NZ3W3qxNoSgS3cXMikKibn6y40hZMMvUmUHriUXbNvtMUWT+6BrB6ATgH69Ng0CoS36tsDtQbitkHK3Iv6v8GQ7gRda8djQ6Uc5DfoTR8vF+brwhV+LvBIORoueVXQAp7GSzlYUicfeqnOXdyKjkF4QibzWrkFyw8b2cuUvvbwxyJe2IVSkZVuyATa06XDkxSbu9+cWPj6sV1iZfNGPiz/GjpMg+cVzkhqMHZFAqj6EmwgCse2DelFQ8HHkNoB9dI63lTa1NJY11B80K2B8=" // your encrypted pay distribution config

_ = Argyle.shared
    .loginWith(linkKey: "YOUR_LINK_KEY", apiHost: "https://api-sandbox.argyle.com/v1") 
    .payDistributionUpdateFlow(true) 
    .payDistributionConfig(PD_CONFIG) 
    .payDistributionItemsOnly(true) // only Link items that support pay distribution update will be shown to users.
    .resultListener(self)

let argyle = Argyle.shared.controller
argyle.modalPresentationStyle = .fullScreen
self.present(argyle, animated: true, completion: nil)
val PD_CONFIG = "CiQAB/5leTZndFpuHjsJx1SMoI2PnGDpaTPib/ApXLhVNHVuVukS8wEAfV+QlRWuG52YXKQSdy0hKg1Y768QUtOyI5CRMl7LRWn6axC0NZ3W3qxNoSgS3cXMikKibn6y40hZMMvUmUHriUXbNvtMUWT+6BrB6ATgH69Ng0CoS36tsDtQbitkHK3Iv6v8GQ7gRda8djQ6Uc5DfoTR8vF+brwhV+LvBIORoueVXQAp7GSzlYUicfeqnOXdyKjkF4QibzWrkFyw8b2cuUvvbwxyJe2IVSkZVuyATa06XDkxSbu9+cWPj6sV1iZfNGPiz/GjpMg+cVzkhqMHZFAqj6EmwgCse2DelFQ8HHkNoB9dI63lTa1NJY11B80K2B8=" // your encrypted pay distribution config

val config = ArgyleConfig.Builder()
    .loginWith("YOUR_LINK_KEY", "https://api-sandbox.argyle.com/v1", "")
    .payDistributionConfig(PD_CONFIG)
    .payDistributionItemsOnly(true)  // only Link items that support pay distribution update will be shown to users.
    .payDistributionUpdateFlow(true) 
    .setCallbackListener(object : Argyle.ArgyleResultListener {
        // callbacks 
    })
    .build()

Argyle.instance.init(config)
Argyle.instance.startSDK(this)
import ArgyleSdk from '@argyleio/argyle-plugin-react-native'

const PD_CONFIG = 'CiQAB/5leTZndFpuHjsJx1SMoI2PnGDpaTPib/ApXLhVNHVuVukS8wEAfV+QlRWuG52YXKQSdy0hKg1Y768QUtOyI5CRMl7LRWn6axC0NZ3W3qxNoSgS3cXMikKibn6y40hZMMvUmUHriUXbNvtMUWT+6BrB6ATgH69Ng0CoS36tsDtQbitkHK3Iv6v8GQ7gRda8djQ6Uc5DfoTR8vF+brwhV+LvBIORoueVXQAp7GSzlYUicfeqnOXdyKjkF4QibzWrkFyw8b2cuUvvbwxyJe2IVSkZVuyATa06XDkxSbu9+cWPj6sV1iZfNGPiz/GjpMg+cVzkhqMHZFAqj6EmwgCse2DelFQ8HHkNoB9dI63lTa1NJY11B80K2B8=' // your encrypted pay distribution config

// Configure the SDK before hand, once. only call ArgyleSdk.start() when the UI is needed
ArgyleSdk.loginWith("YOUR_LINK_KEY", "https://api-sandbox.argyle.com/v1", "")
ArgyleSdk.payDistributionConfig(PD_CONFIG)
ArgyleSdk.payDistributionUpdateFlow(true)
ArgyleSdk.payDistributionItemsOnly(true)  // only Link items that support pay distribution update will be shown to users.

// Launch the SDK
ArgyleSdk.start()

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

Trigger periodic scans

Periodic scans detect when a user or their employer has updated their employment data. Follow this tutorial to understand how to trigger a scan of sandbox data.

Prerequisites

Before you triggering a periodic scan, you must:

Period scan data

In the production environment, new data for connected accounts is constantly generated and delivered to you—for example: new payouts, activities—during periodic data scans. For testing purposes, you can trigger a periodic scan to get new data for an account that is already connected.

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

Trigger a scan of sandbox data

Use this endpoint to trigger the scan in the sandbox:

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

This endpoint accepts POST requests with an empty body.

<acc-id> must be a sandbox accounts.id, otherwise this error is returned:

{
    "account": [
        "Periodic scan can be manually scheduled only for sandbox accounts."
    ]
}

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

Trigger errors

Sandbox mode gives you an opportunity to simulate error scenarios, so you understand how and why errors can occur in your implementation. You can also see how these errors appear for your users. You can trigger errors in two ways in the sandbox:

Prerequisites

Before triggering errors, you must:

Possible errors

You can trigger these errors in the sandbox:

Account connection errors
  • account_inaccessible
  • account_incomplete
  • account_disabled
  • expired_credentials
  • invalid_account_type
  • invalid_auth
  • login_attempts_exceeded
  • mfa_attempts_exceeded
  • mfa_exhausted
  • mfa_not_configured
  • physical_mfa_unsupported
  • platform_unavailable
  • service_unavailable
  • system_error
  • tos_required
  • trial_connections_exhausted
  • trial_period_expired
  • unsupported_auth_type
  • unsupported_mfa_method
Pay distribution errors
  • account_disconnected
  • bank_and_card_update_failed
  • card_update_failed
  • confirmation_timeout
  • incompatible_config
  • invalid_account_state
  • mfa_attempts_exceeded
  • mfa_exhausted
  • mfa_not_configured
  • missing_allocation
  • missing_allocation_type
  • not_supported
  • not_supported_by_employer
  • physical_mfa_unsupported
  • rejected_bank_account
  • rejected_card
  • rejected_microdeposit
  • rejected_routing_number
  • service_unavailable
  • system_error
  • unsupported_allocation_type
  • unsupported_bank_accounts
  • unsupported_bank_account_country
  • unsupported_mfa_method
  • waiting_period
Rescan errors
  • auth_required

See the Account connection errors and Pay distribution errors documentation for complete definitions of these errors.

Trigger errors via Console

You can trigger errors directly in Console using the Link Emulator. See this video or follow the steps below to learn how to test this feature in Console:

  1. Toggle the Simulate an error option to ON and select the error you want to test.
  2. Toggle the Simulate a direct deposit switch option to test pay distribution errors. Account connection errors are available by default.
  3. Copy the generated password and paste it into the Link login password field.
  4. Click Connect.

Different error types behave differently at this stage:

  • Connection errors occur immediately.
  • You must manually trigger a periodic scan for a specific account to trigger a rescan error after successfully connecting an account.
Some pay distribution errors occur once the account is connected.
  • account_disconnected
  • incompatible_config
  • invalid_account_state
  • missing_allocation
  • missing_allocation_type
  • not_supported
  • not_supported_by_employer
  • unsupported_allocation_type
  • unsupported_bank_accounts
  • waiting_period
You must confirm a pay distribution update to trigger the remaining pay distribution errors.
  • bank_and_card_update_failed
  • card_update_failed
  • confirmation_timeout
  • mfa_attempts_exceeded
  • mfa_exhausted
  • mfa_not_configured
  • physical_mfa_unsupported
  • rejected_bank_account
  • rejected_card
  • rejected_microdeposit
  • rejected_routing_number
  • service_unavailable
  • system_error
  • unsupported_bank_account_country
  • unsupported_mfa_method

This is what you'll see in Console when you trigger the auth_required error:

Trigger error in ConsoleTrigger error in Console

Trigger errors via API

You can use an encoded JSON password to trigger errors via the API. See this video or follow the steps below to learn how to test this feature using the API:

  1. Define a scenario in a JSON format, such as:
{
    "failure": {
        "fail_on": "connection",     
        "error": "account_disabled"
    }
}

You can choose from these fail_on values:

  • connection - Use this value to simulate account connection errors.
  • pay_distribution_update - Use this value to simulate pay distribution errors.
  • rescan - Use this value to simulate rescan errors.

See the Possible errors section for a complete list of values for the error field.

  1. Call the password-encoding endpoint:
POST /v1/test-password/encode
{
    "failure": {
        "fail_on": "connection",     
        "error": "account_disabled"
    }
}
  1. Receive a response with the encoded password:
{
    "test_password": "eyJmYWlsdXJlIjogeyJmYWlsX29uIjogImNvbm5lY3Rpb24iLCAiZXJyb3IiOiAiYWNjb3VudF9kaXNhYmxlZCJ9fQ=="
}
  1. Use the test_password that you received in the Link login password field and click Connect. Different error types behave differently at this stage:
  • Connection errors occur immediately.
  • You must manually trigger a periodic scan for a specific account to trigger a rescan error after successfully connecting an account.
Some pay distribution errors occur once the account is connected.
  • account_disconnected
  • incompatible_config
  • invalid_account_state
  • missing_allocation
  • missing_allocation_type
  • not_supported
  • not_supported_by_employer
  • unsupported_allocation_type
  • unsupported_bank_accounts
  • waiting_period
You must confirm a pay distribution update to trigger the remaining pay distribution errors.
  • bank_and_card_update_failed
  • card_update_failed
  • confirmation_timeout
  • mfa_attempts_exceeded
  • mfa_exhausted
  • mfa_not_configured
  • physical_mfa_unsupported
  • rejected_bank_account
  • rejected_card
  • rejected_microdeposit
  • rejected_routing_number
  • service_unavailable
  • system_error
  • unsupported_bank_account_country
  • unsupported_mfa_method

Encoded passwordEncoded password


What’s Next
Did this page help you?