Saltar al contenido principal

Tax Rates

A tax rate is a tax you charge, for example IVA at 21%. Set it on a product as taxRateId, and every price of the product charges it.

Inclusive and exclusive prices​

The taxBehavior of a price says how the tax applies:

  • INCLUSIVE (the default): unitAmount holds the tax. A 1210 price at 21% charges 1210, of which 210 is tax.
  • EXCLUSIVE: the tax is added to unitAmount. A 1000 price at 21% charges 1210.

A subscription created from a taxed price stores the amount with tax as amount, and the tax as tax.

Changing a rate​

percentage and taxType never change. To change a rate, create a new tax rate and set it on the product. New subscriptions and price switches then use the new rate. Existing subscriptions keep their tax until they switch price.

Archiving​

Tax rates are never deleted. Set active to false to archive one.