Tax Associations

Create Tax Association

Changed on

Use when linking a tax rate to an entity (e.g. customer, product, or region) so that rate applies on invoices.

post/taxes/associations

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/taxes/associations
  • Auth
    API key in header x-api-key

Request body

auto_applyboolean
currencystring
end_datestring date-time

EndDate sets when this association expires. Must be after StartDate when both are provided.

entity_idstring
entity_type'customer' | 'subscription' | 'invoice' | 'tenant' | 'credit_note'
external_customer_idstring
metadataobject
priorityinteger
start_datestring date-time

StartDate sets when this association becomes active. Defaults to now if omitted.

tax_behavior'inclusive' | 'exclusive'
tax_rate_codestring required

Response

OK

auto_applyboolean

Whether this tax should be automatically applied

created_atstring date-time
created_bystring
currencystring

Currency

end_datestring date-time

EndDate is the optional date until which this association is active

entity_idstring

ID of the entity this tax rate applies to

entity_type'customer' | 'subscription' | 'invoice' | 'tenant' | 'credit_note'
environment_idstring

EnvironmentID is the ID of the environment this tax rate config belongs to

idstring

ID of the ent.

metadataobject

Metadata holds the value of the "metadata" field.

priorityinteger

Priority for tax resolution (lower number = higher priority)

start_datestring date-time

StartDate is the date from which this association is active

status'published' | 'deleted' | 'archived'
tax_behavior'inclusive' | 'exclusive'
tax_rate_idstring

Reference to the TaxRate entity

tenant_idstring
updated_atstring date-time
updated_bystring

Changes

    • warning

      added the new credit_note enum value to the response property for the response status

    • info

      added the new credit_note enum value to the request property

    • warning

      removed the optional property / from the response with the status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      removed the fixed enum value from the / response property for the response status