How to Apply Indian GST in Magento 2
Goods and Service Tax (GST) is a value-added tax levied at all points in the supply chain on products and services. It was introduced in India on 1 July, 2017 which put an end to multiple taxes charged by Central and State Government.
Being the most popular platform, Magento 2 store owners are in a race to implement GST in their stores at the rate of knots. They need to develop and implement a system which integrates Indian GST to their Tax Calculation in Magento 2. Here I’m sharing the detailed guide to apply Indian GST in Magento 2.
Before starting to create GST rules and rates, store owners need to find GST rate under which their products fall. The GST rates for all the products can be found under GST Rate Finder website objectively created by the Indian government. Once you find GST rates for your store products, you can start creating GST tax rules and rates in Magento 2.
In the below steps, we are considering the GST rate as 5%, origin of the business i.e state as Gujarat. Here, the business location plays vital role in calculating CGST-SGST or IGST. If the selling is performed Intra-state, CGST (2.5%) and SGST (2.5%) will be applied and equally divided to make GST. But if the selling is performed Inter-State, IGST (5%) will be applied. Let’s have a look at detailed steps to apply Indian GST in Magento 2.
Steps to Apply Indian GST in Magento 2
- First of all, you need to create 3 new tax rules named SGST, CGST and IGST. Go to Stores > Taxes > Tax Rules and click on “Add New Tax Rule”. Name it and click add new tax rate to add tax rate for the rule you are creating.
- While creating SGST and CGST, you have to set the rate to 2.5% and state as Gujarat as we are considering as the business origin. But for IGST, you have to set the tax rate to 5% and you have to create as many rules for it as many states are there in India i.e 29 rather than Gujarat. Click save once done.
- Now from Additional Settings, create product tax class named GST and select the same for all 3 CGST, SGST and IGST Rules.
- Create tax rules and rates for SGST and IGST as explained. Once done, the saved rules can be seen enlisted under Tax Rules.
- Tax Rates for CGST, SGST and IGST can be seen under Stores > Taxes > Manage Tax Zones & Rates.
- Now, SGST and CGST are equally divided in two halves of the amount of tax rates, i.e., 5%. According to the government rule, sellers have to split and bifurcate CGST and SGST taxes separately in order details and invoices for every single order.To bifurcate GST taxes to show separately in all the order related documents, you have to custom code as default Magento 2 doesn’t provide the facility.Copy file from Magento_Root/vendor/magento/module-tax/view/frontend/web/js/view/checkout/summary/tax.js and paste it in Magento_Root/app/design/frontend/[Your_Theme]/Magento_Tax/view/frontend/web/js/view/checkout/summary/tax.js
Add following code in the copied file at line no. 99
12var taxSegment = totals.getSegment('tax');amount = amount / taxSegment['extension_attributes']['tax_grandtotal_details']['0']['rates']['length'];
12345formatPrice: function (amount) {var taxSegment = totals.getSegment('tax');amount = amount / taxSegment['extension_attributes']['tax_grandtotal_details']['0']['rates']['length'];return this.getFormattedPrice(amount);}, - Now assign tax class as GST to all the products in Products > Catalog using update attributes action. Simply go to Product > Catalog, select products, select Update Attributes action from the dropdown, go to Tax Class, tick Change and set GST from the dropdown.
- To display the tax summary in detail, set Yes to “Display Full Tax Summary” in Stores > Configuration > Sales > Tax > Shopping Cart Display Settings.
- Now when you have followed all the steps above, you are ready to see the GST applied on Magento 2 products. Simply add products to cart, select country and state. Here, set Gujarat state to check CGST-SGST applied on order.
- Now to check the application of IGST, select states other than Gujarat for which you have created rules and rates. Here, we have selected Karnataka to get you an idea on how IGST will be applied.
The above steps are enough to apply GST in Magento 2. But it needs you to create 29 tax rates for IGST, don’t you think it takes your much time and efforts?! Also, what if you have products which belong to multiple tax rate slabs? You have to create as many rules and rates for each. 🙁
If you want to be out of this hassle and have an automated system to apply GST in Magento 2 store products, take a look at our Magento 2 GST India extension which has oh so wow! features to add GST with ease. Try our Free GST Calculator to calculate the GST rates more accurately in a precise way. Adding GST in Magento 2 was never easy before, take a look at the detailed features and give a try using the live demo. I’m sure you will love using automation rather the above manual steps!
Let me know how much time did it take to apply GST in Magento 2 manually? Also, if you stuck somewhere, have queries or want to give feedback, comment down below, I’m always ready to welcome your words! Don’t forget to hit the 5 stars to appreciate our tutorial.
Implement Indian GST tax system and automate tax calculation in Magento 2.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
19 Comments
Hi Sanjay Jethva,
I have follow all the step but in the cart page showing only one part of tax rate that is CGST(9%) the other part of tax rate is not showing that is SGST.
Hello Rohit,
It seems that you’ve mistaken something.
Please follow the mentioned steps properly.
Thank You
How to add CESS like swachh Bharat Cess 1 %.
Hello Megha,
You can change the percent in Step 2 as per your requirements.
Thanks
ya I had changed tax class
I can help you solve the issue if you contact me at https://meetanshi.com/contacts
I had created the same way which i had created for 12 and 5, tax class for 3 and 18 is also there.
Did you change the tax class in the product?
Ya I had created tax rule still 3,18 not working.
The way you created the tax class for rule 12 and 5, did you create the same for rule 3,18?
If so, do you see the tax class for rule 3,18 in the dropdown in Product Edit?
IGST for 3,18 is not working. It is working with 12 and 5 percent. Can you please help with that.
Hello Asiq,
You need to create tax rule for 3,18
I am looking to configure the following tax structure as the GST has changed to the following in the apparels category
– For item value greater than Rs.1000, the GST to be charged at 12%
– For item value less than Rs.1000, the GST to be charged at 5%
Let me know how to configure the same in Magento 2 tax
Using default Magento 2 Tax class you can not achieve this functionality, you need to custom develop this feature.
By the way, we have developed Magento 2 GST Extension which can Help you with this requirement.
I was looking for an authoritative content on “GST ” and this article accurately explains the concepts relating to the same. It is an understandable, informative and a very well written content piece.
I tried above solution to display CGST and SGST amount separately but it doesn’t work. Instead it showing CGST (6%) = 138 and SGST (6%) is blank. And the actual output should be CGST (6%) = 69 and SGST (6%) = 69. Please help!!
Step 6 having the changes to file tax.js is responsible for showing CGST and SGST separately. Make sure you have followed all the steps above.
In my installation 2.2.6 this path is not available:
Magento_Root/app/design/frontend/[Your_Theme]/Magento_Tax/view/frontend/web/js/view/checkout/summary/
Available Path is:
Magento_Root/app/design/frontend/Magento/ (And this directory is empty)
Please suggest / comment.
Use the path below:
Magento_Root/app/design/frontend/Magento/luma/Magento_Tax/view/frontend/web/js/view/checkout/summary/