Niyya is an Arabic term meaning intention. All actions are judged by intention by Allah on the day of judgement.
The role of intention varies between different Islamic legal schools with regard to the impact towards the permissibility and judgement on earth, but it does not differ in the responsibility for each single person's intention on the day of judgement.
The reason for the difference in regard to the role of intention in legal issues is mostly that a judge may not want to make assumption on parties' intentions and therefore will focus on the written contracts.
Niyya and Islamic finance
In public discussions several Islamic finance products, e.g. Tawarruq are criticised for fitting only with the contractual form but not with the substance of an Islamic transaction. The intention, Niyya, of the transaction is assumed to be still the same as with the prohibited activity.
It is for the Muslim investor to enter into contracts that he is happy to be judged on the day of judgement and not just on earth.
Powers, Paul R. Intent in Islamic law: motive and meaning in medieval Sunnī Fiqh, 2006.
Edwardes, Warren. It’s the niyya that counts, 2010.