# The marketplace selectively collects and pays tax

Source: https://developer.avalara.com/marketplace-integration-guide/configure-your-avatax-account/marketplace-selectively-collects-and-pays-tax/

This section describes how to set up a company so that you can begin calculating, collecting, and paying tax in specific, selective locations (for example, enabled in marketplace states and disabled in non-marketplace states). The Avalara Knowledge Center provides detailed information about how to set up a company, including the [information you need to collect](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/What_you_need_to_create_a_company_profile.html), [adding your company information](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Add_your_company_information.html), and [specifying where you’ll collect taxes](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Tell_us_where_you_collect_and_pay_tax.html).

For this type of integration, you'll:

1.  Set up a default, or parent, company that will collect and pay tax in all jurisdictions where the marketplace has a presence. This company profile represents where the marketplace has a presence.

2.  Next you’ll create a second company and enable tax collection in all other jurisdictions. This will facilitate tax calculation for any jurisdiction where the marketplace isn’t the marketplace facilitator (MPF).

The second company enables client-side filtering for each of the merchants on your marketplace. This allows each merchant to identify the jurisdictions where they have to collect tax not covered by the marketplace. For example, imagine a sales transaction with goods purchased from three merchants, but two of those merchants don't collect tax in the buyer's jurisdiction. By using a second company that calculates tax in those jurisdictions, your marketplace can still create a separate transaction for each merchant.

For every transaction, the marketplace must determine whether the marketplace or the vendor is the merchant of record. If the vendor is the merchant of record, then determine whether the vendor must collect tax in the jurisdiction where the transaction occurs. Specifically, did the vendor selectively enable tax collection in that jurisdiction? If the answer is "yes," then send the transaction to AvaTax (second company) to perform the tax calculation. If the answer is "no," then AvaTax considers this as a "No Nexus" transaction as described in the [Marketplace workflow where the marketplace collects and pays tax selectively](/marketplace-integration-guide/design-the-document-workflow/workflow-marketplace-selectively) topic, and AvaTax won’t calculate tax.

## Create the default company

1.  Sign in to your Avalara [Sandbox](https://sandbox.admin.avalara.com) environment.

1.  Check your email for the confirmation that you received from Avalara when you signed up for your account.

1.  Sign in to your account using the username and link in your confirmation email.

1.  Follow the prompts to create a new password.

1.  Select I accept to the Terms and Conditions.

6.  Click Get Started to begin the walk through for adding a company. The first step is to specify a name and unique taxpayer ID for the company. Be sure to leave the Organize this company under a parent company checkbox empty because this is a parent company. Select Next when you've finished. This information isn't verified, so technology partners can specify a generic name and taxpayer ID.

7.  Enter a mailing address for your company. Validate the address, and then select `Next`.

8.  Once you've validated your company's primary address, AvaTax enables tax collection in that jurisdiction. The next step is to add more regions where this company will collect tax. Select Yes, add more U.S. regions, then choose Select from a list.

9.  Enable jurisdictions in all locations where your marketplace has a presence. For this integration guide, also select Washington and District of Columbia. Select Add selected regions.

10.  For regions where a sales and/or seller use tax could apply, AvaTax will prompt you to specify the type of tax to collect. Keep in mind that the tax type you select should match the tax return you need to file. Select Next.

11.  When prompted to confirm whether this company collects and pays tax in other countries, make your selection based on the scope of your integration. When you've finished, select No, where I collect tax is complete.

12.  A confirmation page opens. Select Done with tax jurisdictions.

13.  Finally, select **Activate Company**.

## Create a second company

As indicated previously, the purpose of the second company is to enable a tax calculation from merchants operating outside of the jurisdictions where you’re the merchant of record. Follow the steps below to create a second company. Keep in mind that you can set up the second company as a separate reporting entity using the steps above or as a child company that doesn't inherit company profiles from the default/parent company. The example below sets up this second company as a child company.

1.  Sign in to your Avalara [Sandbox](https://sandbox.admin.avalara.com) environment.

2.  AvaTax opens and defaults to the parent company you created above. Select the Switch company link beside your company name.

3.  The Your companies page opens. Select Add a company.

4.  The walk through page opens. Select Get started to begin the initial setup:

    1.  Specify a name and unique taxpayer ID for the company.

    2.  In the lower section, select the Organize this company under a parent company checkbox.

    3.  Specify the parent company that this child company will reside under. Type the name of the company that you created above in the field, then select it when AvaTax verifies the entry.

    4.  By default, this company will inherit the company profiles of the parent company. For marketplace facilitators, this company will need its own set of company profiles. Disable the Use the tax collection settings of the parent company checkbox.

    5.  Select Next.

5.  Enter a mailing address for your company. You can use the same address as the parent company.

6.  Validate the address, and then select Next.

7.  The next step is to add more regions where this company will collect tax. Select Yes, add more U.S. regions, then choose Select from a list.

8.  Select all the jurisdictions that you didn't specify in your parent company, then select Add selected regions.

9.  For regions where a sales and/or seller use tax could apply, AvaTax prompts you to specify the type of tax to collect. Keep in mind that the tax type you select should match the tax return you need to file. Select Next.

10.  When prompted to confirm whether this company will collect and pay tax in other countries, make your selection based on the scope of your integration. If you've finished, select No, where I collect tax is complete.

11.  A confirmation page opens. Select Done with tax jurisdictions.

12.  Finally, select Activate Company to begin using AvaTax.