Use the Finch Sandbox to generate mock connections with Finch providers, see which fields are supported, and configure the data for unique testing scenarios.
The Finch Sandbox contains mock data that mirrors the field and functionality support of Finch’s production integrations, and allows you to configure connections into whatever scenario you need to test against.
Finch Sandbox connections can only be created using the sandbox client_id
and client_secret
found in your Finch Dashboard. You cannot use production credentials to create sandbox connections.
Use sandbox=finch
as a query parameter for the Finch Sandbox. sandbox=true
is deprecated.
You can initiate a connection in the Finch Sandbox three ways:
client_id
and client_secret
found in your Finch Dashboard and pass in the sandbox=finch
query parameter. See below for mock credentials to enter in Finch Connect. This method can be used to test the exchange of the authorization code for an access token.client_id
and client_secret
from your Finch Dashboard to authenticate the API call. This is useful for repeatable testing, for example during automated testing scenarios. However, this method does not open the Finch Connect flow so does not test exchanged the authorization code for an access token.In Finch Sandbox mode, Connect simulates various scenarios to meet your testing needs. The credentials you use while logging in determine the behavior of the Finch Connect flow.
For all credential flows, use the username good_user
. The password will determine the steps presented in the flow:
good_pass
.mfa
.account_selection
.mfa_account_selection
.good_token
to trigger a successful auth. Any other value will result in an error.good_user
and good_pass
for client_id
and client_secret
flows. Any other values will result in an error.All OAuth auth methods will bypass the provider OAuth flow when in sandbox mode. Clicking “Connect” will immediately result in success
Finch will pre-populate data for each sandbox connection you create with randomly generated data based on the scopes available on the connection. We will populate 20 employees with corresponding employment
and individual
data by default, along with one company payment whose pay date is the current date. The payment will contain one pay statement for each full-time employee.
PUT /sandbox/connections/accounts
will modify the connection status of an existing account. For example you may want to change the connection_status
of an existing automated account from connected
to error_reauth
to simulate a 401
error code responseIf you would like to go beyond the pre-generated data, you can use the /sandbox
endpoints to programmatically modify the data for your connections:
PUT /sandbox/company
to modify company
dataPOST /sandbox/directory
to add new individuals to a companyPUT /sandbox/employment/{individual_id}
to modify employment
information for a specific individualPUT /sandbox/individual/{individual_id}
to modify individual
information for a specific individualPOST /sandbox/payment
to add a new payment for a companySandbox connections function just like production connections in that a sync
is required in order for data updates to be reflected by Finch’s /employer
API endpoints. However, the data syncs do not run automatically every 24 hours
in the Sandbox. Once you have configured new data via the endpoints above, be
sure to run a refresh data sync to see
the new data come through.
Finch’s API uses asynchronous jobs in several scenarios, such as data syncs and operations which write data back into a payroll system, such as deductions enrollments. In these scenarios, Finch returns a job_id
to monitor the job’s progress.
The Finch Sandbox allows you to modify the completion_status of jobs, for jobs with type data_sync_all
configuring the end result a particular type of job should have. For example, you can configure a data sync job to have an error
state to view a simulated error response:
Then, when you run a job with POST /sandbox/jobs
, the job will result in an error. Keep in mind that job completion configurations are persistent; once you set a completion state, each job you run will end in that state until you call PUT /sandbox/jobs/configuration
to change the configuration again.
The Finch Sandbox supports simulating assisted connections by simply choosing an assisted provider when creating a new connection. Follow the steps below to test assisted connections in the Finch Sandbox:
manual=true
and sandbox=finch
. The Finch Connect flow embedded in your Sandbox application’s “Connections” tab in the Finch Dashboard will show only automated integrations.pending
state.connected
to simulate the completion of the assisted connection. This accurately reflects the behavior of a live assisted connection, where the connection status is manually updated by our team after the accountant account is set up..connected
, you will see data for the connection when calling any of the /employer
endpoints./sandbox
endpoints to configure the data for the connection. Once you have configured new data, be sure to run a refresh data sync to see the new data come through.benefit_id
. Create and Register will also return a job_id. The job does not have to complete to use the benefit_id
to call the Enroll Individuals in Deduction endpoint.After completing this step, you have the ability to simulate many types of employment scenarios that your application may encounter when connecting to live employers. Continuously testing, validating, and reviewing your integration will help you stay ahead of potential issues and ensure that your application is making the most of Finch’s services. Once your application is ready, you can begin to connect live providers.