Docs
apply , tax, rates, different, line, items
41524483
2022-06-07T12:38:37Z
2025-02-12T08:23:53Z
177
0
1
254651
How to apply different tax rates to the different line items of my subscriptions on my invoice via API?
Can my line items in a subscription have different tax rates?
Can I apply tax rates as per the product type and generate an invoice?
Summary
Suppose you have different charges added to your subscription and you want each item line to have different tax rates, you can achieve that via API and have the invoice created with the tax rates applied.
Note: tax profiles must be created and you can apply tax only from the settings which are set on your tax profiles. Read more about tax profiles here
Solution
Step 1: Create the desired tax profile with the label tax and tax rate
For example, this country has 3 tax profiles.
And each tax profile has labeled tax and rates defined
Step 3: Use the API for creating invoices for items and one-time charges and pick the invoice attributes and [tax attributes for the invoice
](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2#invoice_taxes)
Step 4: Generate the invoice now for your charge and line items via API and give the amount for the tax rate as you have defined and the exact name matching to the label tax under your tax profiles.
For example: Here the secondary tax profile is used.
Step 5: Check for the invoice being generated and the tax applied to the line items