A DIN will be mandatory for every type of communication by the income tax department to taxpayers, be it a notice, a letter, an order and summon, or any other correspondence. Without it, the document and communication, notice, order by department will be deemed invalid.
So, it's mentioned by department on any communication to taxpayer.
while GSTIN is a GST number taken by persons carrying on business and profession if liable to be registered under GST Act.