Tax associations
You can create a tax association at three levels. Each level is copied down to the next when the child is created, so setting rates on a customer is usually enough.
Copying happens once, at creation time. A tax association added to your tenant today does not reach customers who already exist; create it on those customers directly.
Inclusive versus exclusive tax
A tax association is either exclusive or inclusive. An exclusive tax is added to the price. An inclusive tax is already part of the price.
Inclusive tax never changes what the customer pays, only how much of that payment counts as tax. Pick exclusive when you list pre-tax prices and add tax at checkout, the norm in the US and Canada. Pick inclusive when your listed price is the final price, the norm for VAT and GST.
Set this with
tax_behavior on the association. Leave it out and Flexprice decides from the subscription’s currency, once, at creation time:
Tax exempt customers
Set a customer’stax_treatment to exempt and no tax is collected from them, regardless of what tax associations exist.
Mark a customer exempt when you create them, before subscribing them to a plan. Flexprice never creates a tax association for an exempt customer’s subscriptions, so there is nothing to charge and back out later. This is the recommended way to onboard a tax-exempt customer.
A
tax_treatment change applies from the next invoice onward. It never rewrites an invoice already issued.tax_summary.exemption.reason_code reads customer_exempt for an exempt customer, or no_tax_configured when no tax association was set up at all.
Multiple tax rates
You can create more than one tax association on the same entity. Rates never compound: each is calculated on the same base, not on top of the others.
The city tax is calculated on $100.00, not $106.00. Inclusive rates work differently: they cannot each be pulled out of the price independently, so Flexprice adds them together, takes the combined tax out once, and splits it in proportion to each rate. A $108.00 price with 6% and 2% inclusive holds $8.00 of tax, split $6.00 and $2.00. To set up several rates, see Multiple tax rates on the same entity.
Calculating tax with an external engine
Tax rates work when you already know the rate. Indirect taxes, which are VAT, GST and sales tax, depend on more than that, so you can hand the calculation to an external tax engine instead of maintaining rates yourself. An engine takes some or all of the following into account:- The location of the seller
- The location of the customer
- The location where the activity is performed
- The type of the product sold
- Whether the transaction involves a reverse charge
- The status of the customer, for example whether they are a VAT-registered business, a private person, or an exempt organisation
tax_config setting to enable an engine on an environment. Your business address, your tax registrations, your customers’ tax identification numbers, and the tax treatment of what you sell are then all configured in the engine rather than in Flexprice. Flexprice sends the taxable amount and the customer, the engine returns the tax, and Flexprice records it on the invoice.
While an external tax engine is enabled, Flexprice tax rates and tax associations are not applied to any invoice, and creating a new tax association is rejected. Your existing ones are left untouched and apply again if you disable the engine.
Stripe Tax
Quick start
- Create a tax rate with a unique
codeand a percentage. - Create a tax association linking that rate to a customer or subscription, choosing
inclusiveorexclusive. - Generate an invoice. Flexprice applies the subscription’s tax associations and returns the breakdown in
tax_summary.

