Sandbox
Learn how to preview changes locally
Introduction
The sandbox environment functions as a simulated version of the actual system, designed for testing and development purposes without interacting with real data.
This environment employs mock payroll providers and payslip readers in order to allow developers to evaluate the API interface without compromising real data privacy.
Setting Up for Testing
Before you begin testing, ensure you have the following:
- An API key for authentication: please ask your Teal connection to supply you with an API key
- A callback URL for receiving webhook notifications: generate your URL in webhook.site
1. Webhooks Setup /webhooks
Configure webhooks to receive notifications for events such as new payroll submissions.
Response Example:
2. Create a user /users
Now you need to create a user selecting a user ID from the following users:
The field email
does not have to be a real email address. It can be the user’s identifier in your system.
Response Example:
3. Generating a user token /user-tokens
After creating a webhook, generate a token to authenticate subsequent actions for that user. The token ensures that actions such as account connection and payslip uploads are securely attributed to the correct user.
Response Example:
4. Connecting a Payroll Account /accounts
This simulates the user connecting their payroll account for automatic data retrieval.
Response Example:
5. Retrieve submitted Payroll information /entries/connections
Retrieve payroll for a connected account.
Response Example:
6. Extract Payroll information from a payslip /entries/payslips
This request simulates the user uploading a payslip to extract payroll information. Extracting payslip information can be done using the endpoint below but will usually be done by the user through the WebApp as per section 8
Response Example:
7. Retrieving Payroll Data /payroll
Retrieve the payroll data submitted through the connected account or document upload.
Response Example:
8. WebApp usage
Teal’s webapp can be tested by accessing https://app.sandbox.goteal.co/
in the browser. Use the generated bearer
token in order to identify the user https://app.sandbox.goteal.co/?jwt=<bearer-token>
. The webapp uses the same API
mechanism as the mentioned above, therefore the data will be retrieved in the same way.
Connect a Payroll:
Submit a Payroll:
9. Cleanup: Deleting a User /users
After testing, clean up by deleting the test user and their associated data.
Response Example: