How to include GST tax for my magento2 ?

  • Aman Srivastava, please let me know in detail commands to install magento2-directory-indian-states as i am new to magento 2 and php. Waiting for your reply, Thank you.
    – chitra
    Commented Nov 19, 2018 at 10:38
  • Create a folders Credevlabz/DirectoryIndianStates app/code directory, then download zip and place in that folder Commented Nov 19, 2018 at 13:48
  • And run the following commands: Commented Nov 19, 2018 at 13:49
  • php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:clean php bin/magento indexer:reindex Commented Nov 19, 2018 at 13:49
  • Otherwise follow the below steps: magecomp.com/blog/create-indian-gst-tax-rule-magento-2 Commented Nov 19, 2018 at 13:52

2 Answers 2


You can simply setup GST tax rates, rules and class in Magento 2. You don't need any extension for this.

Download your required tax rates csv file from here and import in your Magento 2. https://github.com/amansrivastava/magento2-in-gst-taxrates/
You need to keep in mind Magento 2 latest version has states list in directory but earlier versions were not having this. So if your Magento instance doesn't show indian states list while checkout. First install this module https://github.com/CreDevLab/magento2-directory-indian-states

  • Then import tax rates and create 4 tax classes: GST 5, GST 12, GST 18 and GST 28
  • Create Tax rules, here keep in mind that there is different GST treatment for interstate sale and intrastate sale. So you'll need to create CGST, SGST and IGST tax rules and assign to respective class.
  • Total 12 tax rules will be created.
  • Assign tax rates to respective tax rule and you are done.
  • Assign these classes in the respective product and you are ready to sale with GST pricing.

I have added all steps in blog post so that everyone can get help from it without buying any paid extension. http://www.credevator.com/how-to-configure-gst-in-magento-2/

I have added above steps in a module which can be directly downloaded to your magento instance and you tax rates will be configured on a button click.

  • How can i account for HSN code
    – Arul
    Commented Jul 11, 2019 at 7:48
  • 1
    @Arul you can add HSN as product attribute. You'll need to do some coding if you want to bind tax rates based on HSN. Currently magento doesn't give flexibility to map tax class based on HSN Commented Jul 11, 2019 at 11:11

There are premade extension available for Indian Sub-Continent.

you need to create 2 types as CGST and SGST for within states and IGST for all over india. please go through below link for more details



Reference : Stack Exchange


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.