Skip to main content

Configure Avalara with Metronome invoicing

Metronome integrates with providers like Avalara to calculate tax for invoices where Metronome is the invoice provider. Metronome calculates tax at the line item level, but records the total tax amount at the invoice level within external_invoice on the Metronome invoice. To calculate tax with Avalara, Metronome needs the following information:
  • Mapping of Metronome customer to the customer record in Avalara. Metronome pulls information such as address and exemption status directly from Avalara.
  • Mapping of Metronome products to Avalara items. Metronome uses the Avalara item id to ensure the correct tax rate is applied per line item.

Connect Metronome and Avalara

Provide Metronome with an Avalara user account via the /upsertAvalaraCredentials end point. Example request shown below:
{
    "delivery_method_ids": ["8e7eed63-2b70-4772-a3cc-929b7582eea7"],
    "avalara_environment": "PRODUCTION",
    "avalara_username": "my-username",
    "avalara_password": "my-password"
}
Company codeMetronome currently only supports a single company code per Avalara environment - the default company listed. If you have more than one company code, please reach out to your Metronome representative.

Map Metronome products to Avalara items

Metronome does not directly store tax rates on Metronome products. Instead, we pull this information from Avalara based on the mapping between Metronome product and Avalara item. Set up tax codes in Avalara Metronome relies on Avalara to store the relevant tax rates for each product you sell. Set up each of your items inside of Avalara and include the relevant tax code for each item. Metronome uses this tax code to ensure the correct rate is set for each line item. Set up entity mapping in Metronome Create a custom field on your Metronome product called avalara_item_code. For each product in Metronome, set the value of this field to the corresponding item code in Avalara. Using the entity mapping feature in Metronome, map the Metronome product to the avalara_item_code. Metronome uses this mapping to set the appropriate item id for each line item on a transaction in Avalara.

Configure your customer

Create the customer record in Avalara

Metronome does not store customer address and therefore needs to pull this information directly from Avalara in order to calculate sales tax. Create the customer record inside Avalara with the correct address information. If there are tax exemptions for the customer, be sure to include this as well.

Set the Metronome customer billing configuration

When creating the customer billing configuration in Metronome, you must specify avalara as the tax_provider along with the avalara_customer_code. See an example call to /setCustomerBillingConfiguration:
{
	"billing_provider": "stripe",
	"delivery_method": "direct_to_billing_provider",
	"tax_provider": "avalara",
	"configuration": {
	  "stripe_customer_id": "cus_A1B2C3D4e5f6g7,
	  "stripe_collection_method": "auto_charge_payment_intent",
      "avalara_customer_code": "avalara-customer"
  }
}
Once set, you can add this configuration to a contract and Metronome will calculate taxes for all invoices tied to it.
ALL TRANSACTIONS SAVEDFor each configured invoice, Metronome commits and saves the document to Avalara. Metronome does not currently support disabling this functionality. If an invoice is voided in Metronome, the associated tranaction is voided in Avalara.

Connecting Avalara to a different billing provider

If you are not using Metronome as your billing provider, please refer to your billing provider’s documentation for how to configure Avalara sales tax calculation. If using Stripe Tax for Stripe invoicing, please refer to the Stripe Tax documentation.