Lago’s native integration with Avalara allows you to automatically update your invoices with tax amounts sourced directly from Avalara. This integration ensures compliance with international tax regulations by calculating taxes for US & non-US obligations, like VAT.
PREMIUM ADD-ON ✨
This integration is available upon request only. Please contact us to get access to this premium feature.
Lago’s native integration with AvaTax (by Avalara) enables seamless tax calculation, application, and reporting throughout the invoicing process.
When an invoice is in draft
status, Lago creates a SalesOrder
in AvaTax to estimate the applicable taxes.
This preliminary calculation allows teams to preview tax amounts before finalizing the invoice.
Once the invoice is finalized
in Lago, a corresponding SalesInvoice
is created in AvaTax.
This marks the transaction as final and eligible for reporting to the appropriate tax authorities, ensuring compliance and traceability.
To calculate tax, Lago includes both the ShipFrom
and ShipTo
addresses for each invoice.
AvaTax uses these details to apply tax rules based on the nexus jurisdictions you’ve configured in your Avalara account.
The calculated tax data is returned from AvaTax and automatically applied to the Lago invoice.
Lago also keeps your records in sync by automatically updating AvaTax whenever an invoice is voided or disputed, or when a credit note is issued. This ensures that your tax reporting in Avalara remains accurate and up to date at all times.
nexus
jurisdictions. These are the states or regions where you are obligated to collect and remit sales tax.Lago supports connections to multiple AvaTax instances, enabling you to integrate both sandbox and production environments seamlessly.
To connect an AvaTax instance:
To synchronize invoices and retrieve tax data, Lago needs to establish a one-to-one relationship between its objects and Avalara products. Follow these steps to map an item:
The invoice will be marked as failed
if any item requiring tax calculation from Avalara is not properly mapped and no fallback item is provided.
The fallback item serves as a backup and is used if the mapping of other items is not defined. This dummy item ensures continuous data synchronization between Lago and Avalara in the event of mapping issues.
Mapping Lago item to Avalara
When creating or updating a Lago customer, you can establish a connection to an existing Avalara customer or automatically create a new one.
Automatically creating a new Avalara customer
To create a new customer in Avalara directly from Lago:
Automatically creating a new Avalara customer
Results:
customer.tax_provider_error
webhook is triggered to notify you of any issuesImporting an existing Avalara customer
To link a Lago customer to an existing Avalara customer:
Importing an existing Avalara customer
Results:
customer.tax_provider_error
webhook is triggered if the sync encounters issuesAvalara requires that each customer in Lago has a valid shipping address with a valid state following the two or three character ISO 3166 region codes. If a shipping address is not available, Lago will default to using the billing address for tax calculation purposes. If both addresses are invalid or missing, Lago will be unable to generate the invoice, and the invoice status will be marked as failed. In such cases, you will be notified of the failure in the dashboard and via webhook.
Mapping Lago item to Avalara
If you need to apply exemptions to a customer, you can upload valid exemption certificates for your customers in Avalara. Ensure that when you create a customer profile in Lago, you use the same customer ID as in Avalara. This consistency allows Lago to correctly identify the customer and apply the exemption certificates when calculating taxes.
If a customer has a tax_identification_number
configured in Lago, this ID will be sent to Avalara for tax calculation and reporting. This ID is essential for determining whether the transaction is subject to a reverse charge in eligible VAT countries.
For customers who qualify for tax exemptions, you need to create a Certificate in your Avalara dashboard. Ensure that the customer profile in Lago uses the same customer ID as in Avalara in the Avalara customer ID. This consistency allows Lago to correctly identify the customer and apply the exemption certificates when calculating taxes.
Lago queries Avalara for the current usage and wallet ongoing balance. To ensure the best experience, Lago caches the results of current usage taxes for 24 hours.
When an invoice is in draft
and encounters a tax synchronization error, you have the option to refresh the invoice to recalculate the tax. The invoice remains editable during this process, and the error will not prevent the invoice from being finalized
. However, if the error persists after attempting to finalize the invoice, the invoice will be marked as failed
.
When an invoice fails due to a tax synchronization error, you have the option to manually re-sync each invoice individually from the invoice details page or via this endpoint. Alternatively, you can go to the integration settings and trigger a bulk invoice synchronization.
Mapping Lago item to Avalara
When an invoice is voided or disputed, Lago will sync this updated record with Avalara to ensure your reports are accurate. If the sync fails, you will be notified via webhook. In that case, please manually resync the voided or disputed invoice through the dashboard.
When a credit note is created, Lago will sync this record with Avalara to ensure your reports are accurate. If the sync fails, you will be notified via webhook. In that case, please manually resync the credit note through the dashboard.
Lago will notify you via webhook if a tax error occurs when a non-invoiceable fee paid in advance is generated. The fee will not be created. Please note that you will need to fix the issue and resend the event to generate the fee. For any assistance, please contact the Lago team.
If Lago is unable to generate an invoice or sync it to Avalara, you will be alerted via the dashboard and webhook. Tax synchronization and invoice generation can fail due to the following reasons:
Tax synchronization can fail during the following processes:
If an issue arises, please check the mapping, verify the customer address and launch a synchronization; or contact the Lago team for assistance.