Sandbox: Advanced Testing
Last updated: September 25, 2026
Finch Sandbox vs. Provider Sandbox: which to use
Start with the Finch Sandbox to test the full range of scenarios, including assisted integrations, and to iterate quickly with controlled data. Use the Provider Sandbox when you need to validate that data flows correctly end-to-end for automated integrations.
You don't need to test specifically against every provider in Finch's network. Finch normalizes data across all providers into a consistent schema, so your application code doesn't change based on which provider an employer uses. Use the to identify which fields are supported for the providers most relevant to your use case.
Scenario | Finch Sandbox | Provider Sandbox |
|---|---|---|
Assisted integrations (connections and deductions) | ✅ Only option | ❌ Not supported |
Automated integrations | ✅ | ✅ |
Automated deductions | ✅ | ✅ |
End-to-end testing | ❌ | ✅ |
Quickly adding or modifying individuals and payments | ✅ Via | ❌ Requires changes in the provider UI |
Simulating connection status changes ( | ✅ | ❌ |
Testing error handling and job failures | ✅ | ❌ |
Multi-entity flows | ✅ Use | Depends on provider |
Testing large data sets | ✅ Via | ❌ Limited by provider demo account |
Testing large data sets
For guidance on configuring and testing with large numbers of employees or payments, see .
Recommended Scenarios to Test
Use the /sandbox endpoints to configure specific employment scenarios before making API calls. Always run a after modifying data to see changes reflected in /employer responses.
Test Your Finch Connect Flow
Successful connection — does your application correctly receive and store the authorization code, and exchange it for an access token?
Reauthentication — when an employer reauthenticates an existing connection, confirm your system stores and uses the new access token. Test this by setting the connection status to
error_reauthusing , then walking through the reconnect flow.
Test specific data scenarios
Build test cases around:
Null field values — Finch always returns the fields defined in the schema, but values may be
nullif a provider doesn't support the field or the employer hasn't populated it. Your application should handle null values without breaking.Reauthentication errors — connections can require reauth when a provider credential expires or changes. Test that your application detects and responds correctly to a
401withREAUTHENTICATE_USER. The application should then generate a reauth session for that connection and then update your system with the new access_token after the employer completes the reauthentication session.Deductions edge cases — if you're using the Deductions product, test enrollment submissions and validate that your error handling surfaces the right feedback to your team and employers.
Rate limits — Finch enforces rate limits per connection. Test that your request patterns stay within bounds and that your application handles
429responses correctly.
Test Employee Onboarding
Call
POST /sandbox/directoryto add a new individual. Setemployment_statustoactive.Run a refresh data sync.
Call
/employer/directoryto confirm the individual appears.Call
/employer/individual/{individual_id}and/employer/employment/{individual_id}to verify their full record is populated correctly.
Test Employee Offboarding/Termination
Call
PUT /sandbox/employment/{individual_id}to updateemployment_statustoinactiveand set atermination_date.Run a refresh data sync.
Call
/employer/employment/{individual_id}to confirm the termination is reflected.Verify your application handles the status change correctly — for example, confirm that deductions enrollment no longer applies to terminated individuals.
Test Payments and Pay Statements
Call
POST /sandbox/paymentto add a payment. Specifystart_dateandend_date.Run a refresh data sync. Confirm the job completes using the jobs endpoint.
Call
/employer/paymentto confirm the payment appears.Call
/employer/pay-statementwith thepayment_idto verify pay statement data for each individual.
A sync includes only payments with a pay date inside the connection's sync window: about 3 months before today through 6 months after. POST /sandbox/payment returns a payment_id for a payment created outside the window, but that payment doesn't appear in /employer responses after a sync.
Test Connection Status Changes
Use the Update Sandbox Account endpoint to simulate various connection states:
curl -X PUT "https://api.tryfinch.com/sandbox/connections/accounts" \
-H "Authorization: Bearer your-access-token" \
-H "Content-Type: application/json" \
-d '{
"connection_status": "error_reauth"
}'
If a connection shows as
reauthin the Finch Sandbox, use this endpoint to update the status toconnectedfor continued testingFor all assisted integrations in sandbox, you are required to call this endpoint to set the status to
connected. This replicates how assisted integrations in production must be manually set up by Finch after the initial connection is created
Testing logic that spans multiple pay statements
For logic that depends on a history of pay statements, such as year-to-date totals, annual contribution limits, or eligibility thresholds, create a small set of payments in the Finch Sandbox, save the responses, and build the rest of your scenarios as fixtures in your own test suite. Configuring every scenario as live sandbox data takes longer and runs into sandbox constraints.
Why fixtures work better for multi-pay-statement logic
Sandbox pay history is generated once, when the connection is created. New payrolls don't accrue over time; you add each one with
POST /sandbox/payment.A sync includes only payments with a pay date inside the connection's sync window, about 3 months back through 6 months ahead. Backdated payments can't build up a full year of history.
Each sandbox scenario requires a create, refresh sync, and read cycle. Fixtures run in seconds and return the same result on every run.
How to build fixtures from sandbox data
Call
POST /sandbox/paymentto create 2–3 payments that include theearnings,employee_deductions, andemployer_contributionstypes your logic reads. Setend_date(the pay date) inside the sync window.Run a refresh data sync.
Call
/employer/paymentand/employer/pay-statementand save the raw JSON responses.In your test suite, copy and edit those responses to build each scenario: change amounts, pay dates, the number of pay statements, or deduction types.
Keep one end-to-end test against the Finch Sandbox that runs the full flow, so you confirm your code reads the live response shape.
Example use cases for pay statement fixtures
Use case | Capture from the sandbox | Fixture scenarios to build |
|---|---|---|
Annual contribution limits (401(k), HSA, FSA) | Pay statements with the relevant | Year-to-date totals just under, at, and over the limit; employee-only, employer-only, and combined contributions; several line items of the same type on one pay statement |
Year-to-date wages and taxes |
| Mid-year hire or termination, off-cycle and bonus payments, pay statements with zero earnings |
Hours-based eligibility (ACA, retirement plan eligibility) |
| Crossing the hours threshold mid-year, variable hours, missing hours |
Deduction amounts compared to enrollment | Pay statements for an individual enrolled in a benefit | Withheld amount matches, differs from, or is missing compared to the enrolled amount |
Null and missing values | Pay statements from the providers most relevant to your use case |
|
Amounts are in cents. Check the Field Support matrix for the providers relevant to your use case, and set fields to null in your fixtures where those providers don't return them.
Data Synchronization Requirements
Critical Step: Refresh Data Sync
Sandbox 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.
After adding or updating any data, always call the Refresh Job endpoint:
curl -X POST "https://api.tryfinch.com/sandbox/jobs" \
-H "Authorization: Bearer your-access-token" \
-H "Content-Type: application/json" \
-d '{
"type": "data_sync_all"
}'