# Test connection button

Source: https://developer.avalara.com/avatax-dm-combined-erp/common-setup/design-the-user-experience/admin/avatax-test-connect-button/

# Test connection button

**Element type: Required**

**Endpoints/models used:** [Ping API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Utilities/Ping/), [QueryCompanies API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Companies/QueryCompanies/)

Your UI must include a button that allows users to test the connection to the AvaTax service and verify the AvaTax credentials. This is an important element to allow for successful troubleshooting of the AvaTax Service. This button can call either the [Ping API](/avatax-dm-combined-erp/common-setup/authentication/ping-the-server), as described earlier in this document, or it can point to the [QueryCompanies API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Companies/QueryCompanies/).

**Advice:** Testing credentials with the [QueryCompanies API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Companies/QueryCompanies/) is a best practice for integrations that support multiple filing entities. This API allows merchants to determine which company profile within their account they want to process a transaction against and post a transaction to. If the query is successful, the API will return a listing of all the companies a merchant has configured in their account. (Ideally, this should be presented in a dropdown for the user.) If the API fails, then present an authentication failure.

![](https://www.avalara.com/content/dam/assets/ui/screenshots/test-connect.png)

[Previous](/avatax-dm-combined-erp/common-setup/design-the-user-experience/admin/avatax-dm-configuration-window)

[Next](/avatax-dm-combined-erp/common-setup/design-the-user-experience/admin/enable-client-side-logging)