Skip to main content
A tax association is the link between a tax rate and an entity. flexprice supports associations at three scopes: tenant (default for all customers), customer (overrides tenant for that customer), and subscription (overrides customer for that subscription’s invoices).

Association fields

Apply to a tenant (default for all customers)

A tenant-level association acts as the default tax for every customer that has no association of its own.
Response

Apply to a specific customer

Customer-level associations override tenant-level ones for that customer only.

Apply at subscription creation

Pass tax_rate_overrides in the create subscription request to link rates directly to that subscription. These override any customer or tenant associations for that subscription’s invoices.
When tax_rate_overrides is set, flexprice uses only those rates for the subscription’s invoices. Customer and tenant associations are not inherited. Omit tax_rate_overrides entirely to inherit from the customer.
tax_rate_overrides fields

Add or remove tax after subscription creation

Use the subscription modification API with type: "tax".

Add a tax rate

effective_date is optional. Omit it to apply the change immediately.

Remove a tax rate

Get the tax_association_id from GET /v1/taxes/associations?entity_type=subscription&entity_id=<subscription_id>. Removing a tax association affects only invoices generated after the change. Previously issued invoices are not changed.

Preview before executing

Swap /modify/execute for /modify/preview to see the effect without committing:

tax_params fields

Multiple tax rates on the same entity

Create one association per rate. Each rate is applied independently to the same taxable base and does not compound.
If the taxable amount is 100,stateat6100, state at 6% adds 6 and federal at 2% adds 2foratotaltaxof2 for a total tax of 8. They do not compound.

List associations

Update an association

You can update priority, auto_apply, and metadata without deleting and recreating.
Setting auto_apply: false pauses the tax without removing the record. Set it back to true to re-enable.

Common patterns

Exempt a specific customer from tax Create no customer-level associations and ensure no tenant associations set to auto-apply are inherited. Customers with no resolvable active association generate invoices with zero tax. Give one subscription different tax treatment Use tax_rate_overrides at subscription creation. The customer’s associations remain unchanged for their other subscriptions. Stop a tax mid-lifecycle Use the modification API with action: "remove". Pass the tax_association_id from listing the subscription’s associations.