Can I use my API Token for more than one website?

Yes, you can use the same TaxJar API Token for multiple Wordpress sites. But there are some considerations and additional steps that would need to be done to these WooCommerce setups to successfully enable this.

An important thing to keep in mind here is that the API Token is tied to your TaxJar account and the nexus configuration of states. 

  • If you are collecting sales taxes in the same states for all WooCommerce sites you should be fine.
  • But if your WooCommerce sites have different nexus determinations (ie: collecting in differing states), you will need a separate TaxJar account for each site to have unique API Tokens and nexus settings.

The following is also required to make sure that each site has custom order IDs.

  • By default, our plugin uses the Post ID within WooCommerce for orders and refunds when syncing to TaxJar. When multiple WooCommerce stores are using the same API key, this introduces the potential for an order from one site overwriting an order from the other site if they share the same Post ID (which could be a common situation). 
  • To address this, it is recommended to add a custom prefix or suffix to one of the site's order and refund IDs. This could be done using one of the custom order numbers mentioned previously (only applies to the order IDs). Or, this could be done using the following code in one of the stores functions.php file:

This code allows unique order IDs to be used for TaxJar Transactions:
add_filter( 'taxjar_get_order_transaction_id', 'custom_taxjar_use_order_numbers', 10, 2 ); function custom_taxjar_use_order_numbers( $order_id, $order ) { return $order->get_order_number(); <br> }

This code allows unique refund IDs to be used for TaxJar Transactions:
add_filter( 'taxjar_get_refund_transaction_id', 'custom_taxjar_use_custom_refund_ids', 10, 2 ); function custom_taxjar_use_custom_refund_ids( $refund_id, $refund ) { $custom_prefix = 'prefix'; return $custom_prefix . $refund_id; <br> }

Problems may arise if both of these sites already have orders present with matching Post IDs. We recommend making the above changes to the site that is not currently connected to TaxJar. Making these changes to the second WooCommerce site prior to connection to TaxJar will allow for differentiation between the orders in each linked site. All orders for the second site will import with the prefix chosen above.

  • Please note: If orders previously imported into TaxJar are updated in WooCommerce, they will be synced again to TaxJar as new orders with their new IDs instead of updating the order presently synced.
  • This is why we recommend making these changes to the currently unconnected site. 

**Please test all of the above changes on a staging site prior to making these changes in a live production environment.**

If you have any questions about this process, feel free to reach out to us at support@taxjar.com.